94% stage-wp-plugin-manager

Code Review | Stage WP Plugin Manager

WordPress plugin Stage WP Plugin Manager scored 94% from 54 tests.

About plugin

  • Plugin page: stage-wp-plugin-m...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0.1
  • WordPress version: 5.8.1
  • First release: Apr 11, 2014
  • Latest release: Dec 7, 2014
  • Number of updates: 10
  • Update frequency: every 28.9 days
  • Top authors: andrezrv (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 1,825 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.20MB] [CPU: ▼145.91ms] Passed 4 tests

This is a short check of server-side resources used by Stage WP Plugin Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.02 ▲0.1834.52 ▲0.32
Dashboard /wp-admin3.31 ▲0.2642.79 ▼2.07
Posts /wp-admin/edit.php3.36 ▲0.2545.38 ▼1.48
Add New Post /wp-admin/post-new.php5.60 ▲0.1789.76 ▼580.28
Media Library /wp-admin/upload.php3.20 ▲0.2031.70 ▲0.18
Stage Management /wp-admin/plugins.php?page=stage-wp-plugin-manager3.2132.54

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Stage WP Plugin Manager: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,727 ▲13115.96 ▲0.2610.94 ▲1.2047.84 ▼2.02
Dashboard /wp-admin3,005 ▲715.96 ▼0.14144.64 ▼1.54110.64 ▼0.10
Posts /wp-admin/edit.php2,779 ▲402.71 ▼0.1467.25 ▲3.3496.99 ▲8.04
Add New Post /wp-admin/post-new.php1,706 ▲20618.43 ▼0.15397.66 ▲7.84106.95 ▲1.41
Media Library /wp-admin/upload.php1,845 ▲385.02 ▲0.00156.75 ▲0.16126.38 ▲7.66
Stage Management /wp-admin/plugins.php?page=stage-wp-plugin-manager1,6112.2372.0879.70

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 items
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/stage-wp-plugin-manager/views/admin/help-getting-started.php:10
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/stage-wp-plugin-manager/views/admin/script.js.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/stage-wp-plugin-manager/views/admin/help-credits.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/stage-wp-plugin-manager/stage-wp-plugin-manager.class.php:34
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/stage-wp-plugin-manager/views/admin/help-add-and-extend.php:10
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/stage-wp-plugin-manager/views/admin/help-description.php:10
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/stage-wp-plugin-manager/views/admin/help-attach-and-detach.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/stage-wp-plugin-manager/views/admin/admin-warning.php:13
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/stage-wp-plugin-manager/views/admin/admin-menu.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues 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
Attributes that require attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

stage-wp-plugin-manager/stage-wp-plugin-manager.php 92% from 13 tests

"Stage WP Plugin Manager" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 474 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,190 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP11106401795
PO File17276319
Markdown138076

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity53.00
▷ Minimum class complexity46.00
▷ Maximum class complexity60.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods53
▷ Static methods11.89%
▷ Public methods3566.04%
▷ Protected methods00.00%
▷ Private methods1833.96%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected