84% inspector-monitoring

Code Review | Inspector Plugin

WordPress plugin Inspector Plugin scored84%from 54 tests.

About plugin

  • Plugin page: inspector-monitoring
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.2.1
  • WordPress version: 6.3.1
  • First release: Jun 4, 2019
  • Latest release: Jun 11, 2019
  • Number of updates: 22
  • Update frequency: every 0.4 days
  • Top authors: ilvalerione (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /645 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.28MB] [CPU: ▼7.02ms] Passed 4 tests

A check of server-side resources used by Inspector Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2846.18 ▲3.18
Dashboard /wp-admin3.59 ▲0.2949.37 ▼2.07
Posts /wp-admin/edit.php3.64 ▲0.2849.98 ▼4.46
Add New Post /wp-admin/post-new.php6.17 ▲0.2885.85 ▼22.40
Media Library /wp-admin/upload.php3.51 ▲0.2839.67 ▲0.84

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

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

Browser metrics Passed 4 tests

Inspector Plugin: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.72 ▲0.361.83 ▲0.2643.53 ▼0.77
Dashboard /wp-admin2,210 ▲335.51 ▼0.1494.71 ▲5.8478.09 ▲32.11
Posts /wp-admin/edit.php2,115 ▲181.97 ▼0.0136.46 ▼3.7936.19 ▼2.39
Add New Post /wp-admin/post-new.php1,554 ▲2822.92 ▼0.28694.76 ▲18.8754.94 ▲0.29
Media Library /wp-admin/upload.php1,415 ▲154.15 ▲0.03100.04 ▼9.0868.18 ▲21.69

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
Please fix the following
  • 19× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Inspector\\Models\\AbstractModel' not found in wp-content/plugins/inspector-monitoring/inspector-php/Models/Transaction.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Inspector\\Models\\AbstractModel' not found in wp-content/plugins/inspector-monitoring/inspector-php/Models/Span.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Inspector\\Transport\\AbstractApiTransport' not found in wp-content/plugins/inspector-monitoring/inspector-php/Transport/AsyncTransport.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Inspector\\Models\\Context\\AbstractContext' not found in wp-content/plugins/inspector-monitoring/inspector-php/Models/Context/ErrorContext.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Inspector\\Models\\Context\\AbstractContext' not found in wp-content/plugins/inspector-monitoring/inspector-php/Models/Context/Socket.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Inspector\\Inspector' not found in wp-content/plugins/inspector-monitoring/inspector-php/Wordpress/InspectorWordpressWrapper.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Inspector\\Models\\Context\\AbstractContext' not found in wp-content/plugins/inspector-monitoring/inspector-php/Models/Context/Http.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Inspector\\Models\\Context\\AbstractContext' not found in wp-content/plugins/inspector-monitoring/inspector-php/Models/Context/Url.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Inspector\\Models\\Context\\AbstractContext' not found in wp-content/plugins/inspector-monitoring/inspector-php/Models/Context/Request.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Inspector\\Transport\\AbstractApiTransport' not found in wp-content/plugins/inspector-monitoring/inspector-php/Transport/CurlTransport.php:9

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 Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: inspector plugins, inspector real time monitoring, real time monitoring, error detection

inspector-monitoring/inspector.php 85% from 13 tests

The main file in "Inspector Plugin" v. 1.2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("inspector-monitoring.php" instead of "inspector.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,579 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP304337101,579

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity5.19
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity1.64
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces7
Interfaces1
Traits0
Classes26
▷ Abstract classes311.54%
▷ Concrete classes2388.46%
▷ Final classes00.00%
Methods182
▷ Static methods42.20%
▷ Public methods17294.51%
▷ Protected methods84.40%
▷ Private methods21.10%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants00.00%
▷ Class constants11100.00%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.14MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/menu_icon_colored.png0.38KB0.38KB▼ 0.52%
assets/icon-256x256.png6.83KB2.85KB▼ 58.32%
assets/icon-128x128.png3.23KB1.77KB▼ 45.11%
assets/banner-1544x500.png52.45KB20.92KB▼ 60.11%
assets/images/logo-horizontal.png16.71KB6.94KB▼ 58.47%