90% diagnosis

Code Review | Diagnosis

WordPress plugin Diagnosis scored90%from 54 tests.

About plugin

  • Plugin page: diagnosis
  • Plugin version: 3.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.8
  • WordPress version: 6.3.1
  • First release: Nov 1, 2010
  • Latest release: Jul 8, 2016
  • Number of updates: 33
  • Update frequency: every 74.3 days
  • Top authors: GaryJ (75.76%)GamajoTech (27.27%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /7,114 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼5.36ms] Passed 4 tests

Server-side resources used by Diagnosis
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0938.06 ▼5.51
Dashboard /wp-admin3.42 ▲0.0746.20 ▼13.30
Posts /wp-admin/edit.php3.53 ▲0.1752.10 ▲2.10
Add New Post /wp-admin/post-new.php6.00 ▲0.1198.26 ▼0.81
Media Library /wp-admin/upload.php3.34 ▲0.1133.31 ▼1.81

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Diagnosis
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.35 ▼0.021.67 ▼0.0245.81 ▲1.95
Dashboard /wp-admin2,203 ▲265.65 ▼0.0188.64 ▲0.0940.38 ▲0.95
Posts /wp-admin/edit.php2,108 ▲81.96 ▼0.0440.17 ▲5.2035.67 ▲2.06
Add New Post /wp-admin/post-new.php1,532 ▲623.49 ▼0.20584.66 ▼101.9852.66 ▼5.50
Media Library /wp-admin/upload.php1,408 ▲84.19 ▼0.0393.88 ▼9.8642.46 ▼3.52

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === diagnosis === )
The official readme.txt might help

diagnosis/diagnosis.php Passed 13 tests

"Diagnosis" version 3.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
98 characters long description:
Adds pages to the Dashboard menu with technical details about PHP, MySQL and other server details.

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
Everything looks great! No dangerous files found in this plugin748 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP267209416
PO File1104214232
CSS110100

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods1470.00%
▷ Protected methods630.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.08MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png84.62KB86.32KB0.00%