83% plugin-inspector

Code Review | Plugin Inspector

WordPress plugin Plugin Inspector scored83%from 54 tests.

About plugin

  • Plugin page: plugin-inspector
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.7
  • WordPress version: 6.3.1
  • First release: Nov 5, 2015
  • Latest release: Dec 11, 2016
  • Number of updates: 15
  • Update frequency: every 79.9 days
  • Top authors: Gioni (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

400+ active /15,176 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼7.96ms] Passed 4 tests

Analyzing server-side resources used by Plugin Inspector
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1242.27 ▼2.14
Dashboard /wp-admin3.42 ▲0.0852.47 ▼11.03
Posts /wp-admin/edit.php3.47 ▲0.1248.53 ▼1.36
Add New Post /wp-admin/post-new.php6.01 ▲0.1286.46 ▼17.32
Media Library /wp-admin/upload.php3.35 ▲0.1238.79 ▲2.77
Plugin Inspector /wp-admin/tools.php?page=plitl3.3235.37
Plugin Inspector /wp-admin/plugins.php?page=plipl3.3234.04

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Plugin Inspector
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4114.38 ▲0.131.75 ▼0.0845.97 ▼1.23
Dashboard /wp-admin2,200 ▲205.59 ▼0.0887.94 ▼8.6939.74 ▼3.51
Posts /wp-admin/edit.php2,108 ▲81.94 ▼0.0736.67 ▼3.8934.54 ▼3.31
Add New Post /wp-admin/post-new.php1,532 ▼523.53 ▲5.11680.15 ▲6.7573.85 ▼0.19
Media Library /wp-admin/upload.php1,405 ▲24.20 ▼0.0097.07 ▼4.0442.30 ▼1.65
Plugin Inspector /wp-admin/tools.php?page=plitl7961.9923.5529.69
Plugin Inspector /wp-admin/plugins.php?page=plipl7962.0025.1728.89

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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 errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/plugin-inspector/inspector.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

plugin-inspector/inspector.php 69% from 13 tests

The principal PHP file in "Plugin Inspector" v. 1.5 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 323 characters long)
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("plugin-inspector.php" instead of "inspector.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected870 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP330191498
CSS2232309
JavaScript283463

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin