89% wpcontrol

Code Review | WPControl - The Easiest Optimization Plugin for WordPress

WordPress plugin WPControl - The Easiest Optimization Plugin for WordPress scored89%from 54 tests.

About plugin

  • Plugin page: wpcontrol
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.0-5.9
  • WordPress version: 6.3.1
  • First release: Apr 1, 2022
  • Latest release: Apr 19, 2022
  • Number of updates: 14
  • Update frequency: every 1.5 days
  • Top authors: szub (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,644 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.36MB] [CPU: ▼2.62ms] Passed 4 tests

This is a short check of server-side resources used by WPControl - The Easiest Optimization Plugin for WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2544.17 ▲4.44
Dashboard /wp-admin3.74 ▲0.4053.73 ▼11.30
Posts /wp-admin/edit.php3.79 ▲0.4455.83 ▲3.39
Add New Post /wp-admin/post-new.php6.28 ▲0.4089.53 ▼6.99
Media Library /wp-admin/upload.php3.60 ▲0.3845.67 ▲11.14

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

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

Browser metrics Passed 4 tests

WPControl - The Easiest Optimization Plugin for WordPress: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,863 ▲11713.27 ▼1.094.76 ▲2.4242.51 ▲1.10
Dashboard /wp-admin2,247 ▲564.87 ▼0.02112.08 ▲9.5840.38 ▼3.66
Posts /wp-admin/edit.php2,134 ▲452.06 ▲0.0636.21 ▼4.5632.94 ▼5.27
Add New Post /wp-admin/post-new.php1,528 ▲923.40 ▲0.28697.06 ▲44.0864.86 ▲6.71
Media Library /wp-admin/upload.php1,432 ▲444.23 ▲0.06101.81 ▼0.2844.81 ▲2.60

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The SRP test was a success

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 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can take inspiration from this readme.txt

wpcontrol/wp-control.php 92% from 13 tests

Analyzing the main PHP file in "WPControl - The Easiest Optimization Plugin for WordPress" version 1.0.1
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wpcontrol.php" instead of "wp-control.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin2,201 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP65495191,954
CSS1689172
JavaScript118368
SVG1007

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity78.50
▷ Minimum class complexity25.00
▷ Maximum class complexity132.00
Average method complexity9.16
▷ Minimum method complexity1.00
▷ Maximum method complexity96.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods19
▷ Static methods15.26%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions104
▷ Named functions104100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/default-gravatar-wpcontrol.png0.19KB0.08KB▼ 57.73%