84% theme-inspector

Code Review | Theme Inspector

WordPress plugin Theme Inspector scored84%from 54 tests.

About plugin

  • Plugin page: theme-inspector
  • Plugin version: 4.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 11, 2015
  • Latest release: Feb 13, 2023
  • Number of updates: 34
  • Update frequency: every 80.6 days
  • Top authors: Melissa Cabral (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /11,062 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.05MB] [CPU: ▼1.09ms] Passed 4 tests

An overview of server-side resources used by Theme Inspector
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0649.12 ▲9.41
Dashboard /wp-admin3.36 ▲0.0654.58 ▲3.00
Posts /wp-admin/edit.php3.41 ▲0.0548.51 ▼0.94
Add New Post /wp-admin/post-new.php5.94 ▲0.0588.25 ▼8.58
Media Library /wp-admin/upload.php3.28 ▲0.0538.19 ▲2.16

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Theme Inspector
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲15514.36 ▲0.011.93 ▲0.1742.05 ▲4.27
Dashboard /wp-admin2,200 ▲205.63 ▼0.0396.43 ▲5.8142.21 ▲0.50
Posts /wp-admin/edit.php2,102 ▼12.01 ▲0.0236.00 ▼4.8434.36 ▼2.14
Add New Post /wp-admin/post-new.php1,528 ▲223.25 ▼0.41669.43 ▲0.0153.51 ▼3.69
Media Library /wp-admin/upload.php1,402 ▲54.18 ▼0.04100.65 ▼13.0942.00 ▼5.65

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means 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 items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-inspector/theme-inspector.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (/assets/screenshot-1.png), #2 (/assets/screenshot-1.png)
Please take inspiration from this readme.txt

theme-inspector/theme-inspector.php 92% from 13 tests

The main PHP file in "Theme Inspector" ver. 4.0.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 157 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
No dangerous file extensions were detected464 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1051325
CSS145139

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.61
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin