78% wp-optimize-it

Code Review | WP Optimize It

WordPress plugin WP Optimize It scored78%from 54 tests.

About plugin

  • Plugin page: wp-optimize-it
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.1-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 21, 2016
  • Latest release: Mar 23, 2016
  • Number of updates: 6
  • Update frequency: every 0.8 days
  • Top authors: akosicb (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /2,167 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼0.21ms] Passed 4 tests

Server-side resources used by WP Optimize It
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0444.60 ▲2.32
Dashboard /wp-admin3.34 ▲0.0450.68 ▲2.77
Posts /wp-admin/edit.php3.39 ▲0.0354.08 ▲1.76
Add New Post /wp-admin/post-new.php5.92 ▲0.0488.65 ▼1.20
Media Library /wp-admin/upload.php3.26 ▲0.0335.73 ▼3.73
Optimize it /wp-admin/tools.php?page=wpl-settings3.2333.25

Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WP Optimize It
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲6913.31 ▼0.991.77 ▲0.0939.91 ▼4.67
Dashboard /wp-admin2,225 ▲255.90 ▲0.91111.92 ▲0.2040.16 ▼2.82
Posts /wp-admin/edit.php2,104 ▲42.04 ▼0.0039.13 ▲3.3137.16 ▲4.52
Add New Post /wp-admin/post-new.php1,543 ▼723.31 ▼0.09672.09 ▼68.1551.65 ▼3.32
Media Library /wp-admin/upload.php1,395 ▼54.19 ▲0.0295.23 ▼14.8641.59 ▼6.13
Optimize it /wp-admin/tools.php?page=wpl-settings8302.0226.4737.71

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-optimize-it/lib/display/tab-content/general.php
    • > /wp-content/plugins/wp-optimize-it/lib/display/tab-content/http.php
    • > /wp-content/plugins/wp-optimize-it/lib/display/tab-content/cache.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-optimize-it/lib/wpl.class.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-optimize-it/lib/class/metabox.class.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-optimize-it/wp_optimize_it.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-optimize-it/lib/display/wpl-view.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-optimize-it/lib/class/cache.class.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: gtmetrix optimization, optimization, disable plugin on pages, pagespeed optimization

wp-optimize-it/wp_optimize_it.php 85% from 13 tests

The main PHP file in "WP Optimize It" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-optimize-it.php" instead of "wp_optimize_it.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 183 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected364 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP76916207
CSS1282129
JavaScript19128

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity9.00
▷ Minimum class complexity3.00
▷ Maximum class complexity13.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin