83% inspector-wp

Code Review | WordPress Inspector

WordPress plugin WordPress Inspector scored83%from 54 tests.

About plugin

  • Plugin page: inspector-wp
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.1
  • WordPress version: 6.3.1
  • First release: May 2, 2016
  • Latest release: Apr 1, 2019
  • Number of updates: 10
  • Update frequency: every 106.4 days
  • Top authors: mailmunch (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

600+ active /14,065 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by WordPress Inspector
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.76 ▲0.89
Dashboard /wp-admin3.33 ▲0.0344.16 ▼4.85
Posts /wp-admin/edit.php3.38 ▲0.0353.44 ▲7.50
Add New Post /wp-admin/post-new.php5.91 ▲0.0381.37 ▼8.76
Media Library /wp-admin/upload.php3.25 ▲0.0238.11 ▲0.15

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WordPress Inspector
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.62 ▼0.754.81 ▲2.8143.20 ▼2.68
Dashboard /wp-admin2,224 ▲334.91 ▲0.0498.93 ▼24.1881.22 ▲39.48
Posts /wp-admin/edit.php2,104 ▲182.02 ▲0.0033.04 ▼1.2532.96 ▼3.04
Add New Post /wp-admin/post-new.php1,532 ▲1823.26 ▲5.81739.55 ▲54.0350.61 ▼10.41
Media Library /wp-admin/upload.php1,406 ▲214.18 ▼0.04113.53 ▲1.7351.52 ▲4.80

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
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • 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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/inspector-wp/wordpress-inspector.php:17

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === inspector-wp === )
The official readme.txt might help

inspector-wp/wordpress-inspector.php 85% from 13 tests

The main PHP file in "WordPress Inspector" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("inspector-wp.php" instead of "wordpress-inspector.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 171 characters long)

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
Good job! No executable or dangerous file extensions detected205 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12411154
CSS110051

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.05
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.65MB with 0.32MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/icon.png0.80KB0.80KB0.12%
img/wptavern.png298.02KB120.47KB▼ 59.58%
img/wplift.png231.12KB77.23KB▼ 66.58%
img/wpmayor.png137.74KB44.08KB▼ 68.00%