84% pmc-benchmark

Code Review | PMC Benchmark

WordPress plugin PMC Benchmark scored 84% from 53 tests.

About plugin

  • Plugin page: pmc-benchmark
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.8
  • WordPress version: 5.8.1
  • First release: Jun 4, 2013
  • Latest release: Nov 24, 2013
  • Number of updates: 6
  • Update frequency: every 28.8 days
  • Top authors: amit (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 1,228 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲30.86MB] [CPU: ▼224.96ms] 75% from 4 tests

This is a short check of server-side resources used by PMC Benchmark
Please fix the following
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 30.86MB on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /29.33 ▲26.6175.12 ▲53.48
Dashboard /wp-admin42.13 ▲39.08116.71 ▲68.56
Posts /wp-admin/edit.php33.61 ▲30.5179.74 ▲32.37
Add New Post /wp-admin/post-new.php32.67 ▲27.2476.74 ▼1,054.23
Media Library /wp-admin/upload.php46.54 ▲43.53200.02 ▲160.85

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 1 new option
New WordPress options
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

Checking browser requirements for PMC Benchmark
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,673 ▲6716.31 ▲0.369.02 ▲1.1444.14 ▼5.75
Dashboard /wp-admin2,927 ▲745.92 ▲0.12163.93 ▲9.58123.51 ▲19.68
Posts /wp-admin/edit.php2,706 ▼02.68 ▼0.0163.22 ▼9.5290.38 ▼12.43
Add New Post /wp-admin/post-new.php45 ▼1,4360.90 ▼17.650.04 ▼392.4831.75 ▼96.94
Media Library /wp-admin/upload.php1,772 ▼05.00 ▼0.01147.39 ▲0.27119.87 ▲3.25

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 1 option in the database
    • recovery_mode_email_last_sent

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
Everything seems fine, however this is by no means 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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pmc-benchmark/pmc-benchmark.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Debug_Bar_Panel' not found in wp-content/plugins/pmc-benchmark/class-pmc-benchmark.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: benchmark, debug bar, profiling, performance, debug...

pmc-benchmark/pmc-benchmark.php 92% from 13 tests

Analyzing the main PHP file in "PMC Benchmark" version 1.1
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 271 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected384 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP48389215
JavaScript14157138
CSS1101031

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity12.00
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity3.54
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods13
▷ Static methods861.54%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin