84% set-the-stage

Code Review | Set the Stage

WordPress plugin Set the Stage scored84%from 54 tests.

About plugin

  • Plugin page: set-the-stage
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Dec 22, 2021
  • Latest release: Aug 16, 2023
  • Number of updates: 7
  • Update frequency: every 86.1 days
  • Top authors: dragunoff (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,313 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.31ms] Passed 4 tests

Server-side resources used by Set the Stage
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0444.39 ▲5.23
Dashboard /wp-admin3.33 ▲0.0350.91 ▲1.29
Posts /wp-admin/edit.php3.45 ▲0.0950.84 ▼3.06
Add New Post /wp-admin/post-new.php5.92 ▲0.0391.56 ▼9.66
Media Library /wp-admin/upload.php3.26 ▲0.0337.15 ▲2.19
Set the Stage /wp-admin/options-general.php?page=drgnff-wp-stage-switcher3.2736.37

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

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

Browser metrics Passed 4 tests

Set the Stage: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.26 ▼0.301.87 ▲0.0539.09 ▼4.32
Dashboard /wp-admin2,214 ▲365.63 ▼0.1384.36 ▼18.3538.55 ▼7.48
Posts /wp-admin/edit.php2,119 ▲162.04 ▲0.0334.58 ▼10.3833.78 ▼6.16
Add New Post /wp-admin/post-new.php1,547 ▲2118.01 ▼5.38641.33 ▲0.9977.48 ▲1.65
Media Library /wp-admin/upload.php1,416 ▲224.24 ▲0.0797.80 ▲1.4443.56 ▼0.10
Set the Stage /wp-admin/options-general.php?page=drgnff-wp-stage-switcher1,1922.4547.4229.09

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • 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)
Good news, no errors were detected

SRP 50% 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
Almost there! Just 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 Drgnff\\WP\\StageSwitcher\\add_action() in wp-content/plugins/set-the-stage/set-the-stage.php:26

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

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #2, #3 in set-the-stage/assets to your readme.txt
The official readme.txt might help

set-the-stage/set-the-stage.php 92% from 13 tests

The entry point to "Set the Stage" version 1.0.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • 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 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin913 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP1218341801
CSS116263
JavaScript117449

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity5.10
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.77
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes110.00%
Methods46
▷ Static methods613.04%
▷ Public methods4291.30%
▷ Protected methods00.00%
▷ Private methods48.70%
Functions6
▷ Named functions233.33%
▷ Anonymous functions466.67%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected