84% benchmark

Code Review | Benchmark

WordPress plugin Benchmark scored84%from 54 tests.

About plugin

  • Plugin page: benchmark
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.2-3.4.2
  • WordPress version: 6.3.1
  • First release: Sep 28, 2012
  • Latest release: Sep 28, 2012
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: mmaunder (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

100+ active /8,804 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▲0.14ms] Passed 4 tests

A check of server-side resources used by Benchmark
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.62 ▲2.72
Dashboard /wp-admin3.36 ▲0.0651.70 ▲3.78
Posts /wp-admin/edit.php3.48 ▲0.1252.85 ▼0.26
Add New Post /wp-admin/post-new.php5.94 ▲0.0690.82 ▼5.21
Media Library /wp-admin/upload.php3.29 ▲0.0642.70 ▲3.33

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Benchmark
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7713.22 ▼1.154.82 ▲3.0741.78 ▼1.09
Dashboard /wp-admin2,226 ▲355.81 ▲0.7398.07 ▼7.2737.42 ▼5.53
Posts /wp-admin/edit.php2,115 ▲232.02 ▲0.0240.17 ▲2.1735.09 ▲1.72
Add New Post /wp-admin/post-new.php1,534 ▲1417.71 ▼5.34647.94 ▼16.0959.81 ▼1.09
Media Library /wp-admin/upload.php1,414 ▲234.21 ▼0.0294.64 ▼21.7644.87 ▼3.11

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/benchmark/benchmark.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/benchmark/lib/benchmarkMenu.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
You can look at the official readme.txt

benchmark/benchmark.php Passed 13 tests

The principal PHP file in "Benchmark" v. 1.1 is loaded by WordPress automatically on each request
53 characters long description:
Benchmark your WordPress server, network and database

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin416 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP479305
JavaScript14083
CSS10028

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity15.00
▷ Minimum class complexity12.00
▷ Maximum class complexity18.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods1676.19%
▷ Public methods1885.71%
▷ Protected methods14.76%
▷ Private methods29.52%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin