{"id":14955017,"url":"https://github.com/makeitworkpress/wp-optimize","last_synced_at":"2025-10-24T07:30:37.152Z","repository":{"id":88581891,"uuid":"55618154","full_name":"makeitworkpress/wp-optimize","owner":"makeitworkpress","description":"The WP Optimize class provides a wrapper to optimize WordPress and remove unnecessary or unwanted functions and scripts.","archived":false,"fork":false,"pushed_at":"2023-11-30T10:54:11.000Z","size":71,"stargazers_count":53,"open_issues_count":0,"forks_count":9,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-01-29T08:33:41.909Z","etag":null,"topics":["wordpress","wordpress-development","wordpress-library","wordpress-optimization","wordpress-php-library"],"latest_commit_sha":null,"homepage":"https://makeitwork.press/scripts/wp-optimize/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/makeitworkpress.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-06T15:33:03.000Z","updated_at":"2024-12-09T11:49:55.000Z","dependencies_parsed_at":"2023-11-30T11:34:13.329Z","dependency_job_id":null,"html_url":"https://github.com/makeitworkpress/wp-optimize","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makeitworkpress%2Fwp-optimize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makeitworkpress%2Fwp-optimize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makeitworkpress%2Fwp-optimize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makeitworkpress%2Fwp-optimize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/makeitworkpress","download_url":"https://codeload.github.com/makeitworkpress/wp-optimize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237932057,"owners_count":19389560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["wordpress","wordpress-development","wordpress-library","wordpress-optimization","wordpress-php-library"],"created_at":"2024-09-24T13:10:23.721Z","updated_at":"2025-10-24T07:30:36.780Z","avatar_url":"https://github.com/makeitworkpress.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wp-optimize\r\nThe WP Optimize class provides a wrapper to optimize WordPress and remove unnecessary or unwanted functions and scripts.\r\n\r\nWP Optimize is maintained by [Make it WorkPress](https://makeitwork.press/scripts/wp-optimize/).\r\n## Usage\r\nInclude the WP Optimize class in your plugin, theme or child theme file by requiring or autoloading the given file. You can read more about autoloading in [the readme of wp-autoload](https://github.com/makeitworkpress/wp-autoload). \r\n\r\n### Choose your optimisations \r\nDetermine which optimizations to run by setting an array of optimisations.\r\nA true value will execute the given optimisation.\r\n\r\nCurrently, the class defaults to the following optimisations:\r\n\r\n    $optimisations = [\r\n        'block_external_HTTP'       =\u003e false, // Block requests to external http. Thus, blocks all request that are done by plugins to external addresses.\r\n        'defer_CSS'                 =\u003e false, // Adds defer=\"defer\" to all enqueued JavaScript files.\r\n        'defer_JS'                  =\u003e true,  // Defers all registered scripts using the loadCSS function from the Filament Group.  \r\n        'disable_comments'          =\u003e false, // Disables the comments functionality and removes it from the admin menu.\r\n        'disable_block_styling'    =\u003e false, // Removes default Gutenberg block styling\r\n        'disable_embed'             =\u003e false, // Removes the script files that are enqueued by the WordPress media embed system.\r\n        'disable_emoji'             =\u003e true,  // Removes the scripts that are enqueued for displaying emojis.\r\n        'disable_feeds'             =\u003e false, // Removes the post feeds.\r\n        'disable_heartbeat'         =\u003e false, // Unregisters the heartbeat scripts, which is usually responsible for autosaves.\r\n        'disable_jquery'            =\u003e false, // Removes the default jQuery script.\r\n        'disable_jquery_migrate'    =\u003e true,  // Removes the jQuery Migrate script.\r\n        'disable_rest_api'          =\u003e false, // Disables the rest api.\r\n        'disable_RSD'               =\u003e true,  // Removes the RDS link in the head section of the site.\r\n        'disable_shortlinks'        =\u003e true,  // Removes the shortlinks in the head section of the site. \r\n        'disable_theme_editor'      =\u003e false, // Disables the file editor for themes and plugins                    \r\n        'disable_version_numbers'   =\u003e true,  // Removes the version trail in enqueued scripts and styles.           \r\n        'disable_WLW_manifest'      =\u003e true,  // Removes the WLW Manifest links in the head section of the site.\r\n        'disable_WP_version'        =\u003e true,  // Removes the WP version from the head section of the site.           \r\n        'disable_XMLRPC'            =\u003e true,  // Disables the xmlrpc functionality.\r\n        'jquery_to_footer'          =\u003e true,  // Moves the default jQuery script to the footer.\r\n        'limit_comments_JS'         =\u003e true,  // Limits the JS for comments only to singular entities\r\n        'limit_revisions'           =\u003e true,  // Limits the number of revisions to 5\r\n        'remove_comments_style'     =\u003e true,  // Removes the .recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;} styling\r\n        'slow_heartbeat'            =\u003e true   // Slows the heartbeat down to one per minute\r\n    ];\r\n\r\n### Create instance\r\nCreate a new instance of the WP_Optimize class with your optimisations array as arguments.\r\n\r\n    $optimize = new MakeitWorkPress\\WP_Optimize\\Optimize($optimisations);\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakeitworkpress%2Fwp-optimize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmakeitworkpress%2Fwp-optimize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakeitworkpress%2Fwp-optimize/lists"}