84% espresso-diagnostics

Code Review | Espresso Diagnostics

WordPress plugin Espresso Diagnostics scored84%from 54 tests.

About plugin

  • Plugin page: espresso-diagnostics
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.3
  • WordPress version: 6.3.1
  • First release: Feb 22, 2020
  • Latest release: Feb 22, 2020
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: giacomocamerano (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /437 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼6.49ms] Passed 4 tests

Server-side resources used by Espresso Diagnostics
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1333.82 ▼9.92
Dashboard /wp-admin3.43 ▲0.0845.58 ▼13.82
Posts /wp-admin/edit.php3.55 ▲0.1848.84 ▲3.11
Add New Post /wp-admin/post-new.php6.03 ▲0.1491.40 ▼3.00
Media Library /wp-admin/upload.php3.35 ▲0.1234.20 ▲0.79
WP Diagnostics /wp-admin/tools.php?page=espresso-diagnostics3.4233.05

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Espresso Diagnostics
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6214.80 ▲0.411.95 ▼0.4240.05 ▼5.86
Dashboard /wp-admin2,214 ▲265.88 ▼0.00104.68 ▼12.5841.56 ▼3.16
Posts /wp-admin/edit.php2,094 ▲52.01 ▼0.0539.53 ▼3.9134.86 ▼5.19
Add New Post /wp-admin/post-new.php1,530 ▼318.08 ▼5.04625.01 ▼30.4649.77 ▼10.95
Media Library /wp-admin/upload.php1,396 ▲84.18 ▲0.0696.64 ▼19.6440.75 ▼4.34
WP Diagnostics /wp-admin/tools.php?page=espresso-diagnostics1,4542.0523.5433.18

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/espresso-diagnostics/admin/partials/espresso-diagnostics-admin-display.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: diagnostics, json export, csv export, security, export plugin

espresso-diagnostics/espresso-diagnostics.php Passed 13 tests

The main file in "Espresso Diagnostics" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
121 characters long description:
Plugin that extracts data on WP installation, installed themes, installed plugins and server info for diagnostic purposes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin705 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP10159509637
CSS111965
JavaScript12273

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity10.33
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods34
▷ Static methods25.88%
▷ Public methods2058.82%
▷ Protected methods00.00%
▷ Private methods1441.18%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected