90% downgrade

Code Review | Downgrade

WordPress plugin Downgrade scored90%from 54 tests.

About plugin

  • Plugin page: downgrade
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.4-4.9
  • WordPress version: 6.3.1
  • First release: May 5, 2016
  • Latest release: Mar 25, 2018
  • Number of updates: 11
  • Update frequency: every 62.6 days
  • Top authors: graphicedit (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /16,039 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.39ms] Passed 4 tests

Analyzing server-side resources used by Downgrade
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0147.13 ▲8.48
Dashboard /wp-admin3.32 ▲0.0250.02 ▼3.29
Posts /wp-admin/edit.php3.37 ▲0.0154.72 ▼2.26
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.31 ▼16.24
Media Library /wp-admin/upload.php3.24 ▲0.0138.28 ▲0.23
Downgrade /wp-admin/options-general.php?page=downgrade3.2134.15

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Downgrade
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.72 ▲0.231.98 ▲0.3840.74 ▲1.75
Dashboard /wp-admin2,199 ▲225.61 ▼0.1087.86 ▼2.1338.94 ▼5.65
Posts /wp-admin/edit.php2,104 ▲42.02 ▼0.1439.11 ▼0.9339.58 ▲0.08
Add New Post /wp-admin/post-new.php1,531 ▲523.20 ▼0.47649.63 ▼28.2052.82 ▼7.11
Media Library /wp-admin/upload.php1,401 ▲14.18 ▼0.0594.82 ▼4.5742.53 ▼6.10
Downgrade /wp-admin/options-general.php?page=downgrade8012.0326.3429.36

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Everything seems fine, however this is by no means an exhaustive test

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 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (set a downgrade WordPress file), #2 (and update)
You can look at the official readme.txt

downgrade/downgrade.php Passed 13 tests

"Downgrade" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
19 characters long description:
Downgrade WordPress

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
There were no executable files found in this plugin43 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1232443

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png22.35KB11.61KB▼ 48.04%
screenshot-1.png17.79KB9.08KB▼ 48.93%