89% error-establishing-db-connection-monitor

Code Review | Error Establishing DB Connection Monitor

WordPress plugin Error Establishing DB Connection Monitor scored89%from 54 tests.

About plugin

  • Plugin page: error-establishin...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.0.3
  • WordPress version: 6.3.1
  • First release: Feb 3, 2019
  • Latest release: Feb 3, 2019
  • Number of updates: 9
  • Update frequency: N/A
  • Top authors: allgen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /626 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.22ms] Passed 4 tests

Analyzing server-side resources used by Error Establishing DB Connection Monitor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.96 ▼0.65
Dashboard /wp-admin3.32 ▲0.0249.14 ▲1.53
Posts /wp-admin/edit.php3.37 ▲0.0249.92 ▼5.77
Add New Post /wp-admin/post-new.php5.92 ▲0.0485.56 ▼18.48
Media Library /wp-admin/upload.php3.24 ▲0.0236.60 ▲0.04
Error Establishing DB Connection Monitor Menu /wp-admin/options-general.php?page=EE-DB-connection-monitor3.2132.09

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Error Establishing DB Connection Monitor
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.32 ▲0.071.66 ▼0.2344.79 ▲1.47
Dashboard /wp-admin2,199 ▲195.51 ▼0.1589.58 ▼0.1037.74 ▼3.66
Posts /wp-admin/edit.php2,104 ▲41.99 ▼0.0536.10 ▼5.1832.61 ▼10.81
Add New Post /wp-admin/post-new.php1,531 ▲323.13 ▼0.25674.10 ▲57.8960.19 ▲7.69
Media Library /wp-admin/upload.php1,407 ▲104.40 ▲0.1895.59 ▼8.2041.67 ▼2.41
Error Establishing DB Connection Monitor Menu /wp-admin/options-general.php?page=EE-DB-connection-monitor8842.0029.6731.31

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

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

Smoke tests Passed 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 Passed 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
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
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: database, monitor, establishing, monitoring, error...

error-establishing-db-connection-monitor/ee-db-connection-monitor.php 77% from 13 tests

This is the main PHP file of "Error Establishing DB Connection Monitor" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("error-establishing-db-connection-monitor.php" instead of "ee-db-connection-monitor.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Please don't use more than 140 characters for the plugin description (currently 159 characters long)

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
There were no executable files found in this plugin254 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP23953164
CSS115366
Bourne Shell14022
JavaScript1102

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity4.00
▷ Minimum class complexity3.00
▷ Maximum class complexity5.00
Average method complexity1.46
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods215.38%
▷ Public methods13100.00%
▷ Protected methods00.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

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ns-sidebar/ns-like.png3.43KB2.50KB▼ 27.21%
ns-sidebar/share-facebook.png0.90KB0.86KB▼ 3.71%
ns-sidebar/share-twitter.png1.25KB1.27KB0.00%
ns-sidebar/ns-follow.png4.95KB2.74KB▼ 44.66%
ns-sidebar/ns-visit.png4.33KB2.60KB▼ 39.89%