78% wpo-enhancements

Code Review | WPO Enhancements

WordPress plugin WPO Enhancements scored78%from 54 tests.

About plugin

  • Plugin page: wpo-enhancements
  • Plugin version: 2.0.11
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.6
  • WordPress version: 6.3.1
  • First release: Nov 24, 2020
  • Latest release: Jan 13, 2021
  • Number of updates: 12
  • Update frequency: every 4.7 days
  • Top authors: SultanICQ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /588 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.13MB] [CPU: ▼2.43ms] Passed 4 tests

Server-side resources used by WPO Enhancements
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1043.86 ▲6.37
Dashboard /wp-admin3.44 ▲0.1445.72 ▼1.90
Posts /wp-admin/edit.php3.55 ▲0.2043.82 ▼4.10
Add New Post /wp-admin/post-new.php6.02 ▲0.1392.92 ▼3.27
Media Library /wp-admin/upload.php3.36 ▲0.1334.05 ▼0.43
WPO Enhancements /wp-admin/options-general.php?page=wpo_enhancements3.3030.08

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WPO Enhancements
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.21 ▼1.281.77 ▲0.1442.58 ▲1.84
Dashboard /wp-admin2,210 ▲245.85 ▲0.87110.49 ▼0.6443.95 ▲0.98
Posts /wp-admin/edit.php2,096 ▲71.97 ▼0.0534.03 ▼4.2931.93 ▼6.32
Add New Post /wp-admin/post-new.php1,531 ▲1723.10 ▲5.55609.35 ▼73.2658.75 ▲2.10
Media Library /wp-admin/upload.php1,395 ▲104.14 ▼0.0994.27 ▼7.5940.76 ▼6.82
WPO Enhancements /wp-admin/options-general.php?page=wpo_enhancements1,0372.0323.8630.17

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpo_enhancements
    • > Notice in wp-content/plugins/wpo-enhancements/src/backend.php+266
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× 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/wpo-enhancements/src/backend.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: cdn, enhancements, page speed insights, optimization, wpo...

wpo-enhancements/plugin.php 85% from 13 tests

The principal PHP file in "WPO Enhancements" v. 2.0.11 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 147 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wpo-enhancements.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin934 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP319658893
JavaScript210041

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity48.00
▷ Minimum class complexity7.00
▷ Maximum class complexity89.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods53
▷ Static methods00.00%
▷ Public methods3667.92%
▷ Protected methods00.00%
▷ Private methods1732.08%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin