78% pg-monitor

Code Review | PG Monitor

WordPress plugin PG Monitor scored78%from 54 tests.

About plugin

  • Plugin page: pg-monitor
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.2.1
  • WordPress version: 6.3.1
  • First release: Feb 28, 2012
  • Latest release: May 25, 2019
  • Number of updates: 17
  • Update frequency: every 155.6 days
  • Top authors: peoplesgeek (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,399 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▲0.17ms] Passed 4 tests

A check of server-side resources used by PG Monitor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.19 ▲1.43
Dashboard /wp-admin3.32 ▲0.0150.18 ▲1.47
Posts /wp-admin/edit.php3.37 ▲0.0146.64 ▼2.23
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.38 ▼0.01
Media Library /wp-admin/upload.php3.24 ▲0.0136.03 ▲2.14

Server storage [IO: ▲0.13MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
It is recommended to fix the following issues
  • The plugin illegally modified 1 file (0.59KB) outside of "wp-content/plugins/pg-monitor/" and "wp-content/uploads/"
    • (modified) .htaccess
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for PG Monitor
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.59 ▼0.584.59 ▲2.6541.85 ▲0.71
Dashboard /wp-admin2,209 ▲184.87 ▲0.0299.28 ▼2.6840.18 ▼6.65
Posts /wp-admin/edit.php2,086 ▼32.01 ▲0.0337.01 ▼2.3836.28 ▲1.01
Add New Post /wp-admin/post-new.php1,514 ▼717.50 ▼5.51676.63 ▲0.7059.50 ▲1.13
Media Library /wp-admin/upload.php1,385 ▼34.24 ▲0.1998.04 ▼7.5441.26 ▼1.81

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/pg-monitor/monitor-external.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/pg-monitor/pg-monitor.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/pg-monitor/monitor-internal.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The monitoring plugin showing the WordPress version of the target), #2 (The monitoring plugin showing the non WordPress version of the target)
You can look at the official readme.txt

pg-monitor/pg-monitor.php 92% from 13 tests

The main PHP script in "PG Monitor" version 1.1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 481 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin117 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4173183
PO File14434

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.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 PNG file occupies 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png58.13KB24.71KB▼ 57.49%