10% staging-users-control

Code Review | Staging Users Control

WordPress plugin Staging Users Control scored10%from 54 tests.

About plugin

  • Plugin page: staging-users-con...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Jul 2, 2014
  • Latest release: Jul 9, 2014
  • Number of updates: 6
  • Update frequency: every 1.2 days
  • Top authors: Yassineh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /674 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Parse error in wp-content/plugins/staging-users-control/staging-users-control.php+41
    syntax error, unexpected '}', expecting end of file

Server metrics [RAM: ▼0.01MB] [CPU: ▼5.23ms] Passed 4 tests

This is a short check of server-side resources used by Staging Users Control
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.79 ▲0.24
Dashboard /wp-admin3.31 ▼0.0448.48 ▼10.58
Posts /wp-admin/edit.php3.36 ▲0.0047.21 ▲2.17
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.85 ▼12.76
Media Library /wp-admin/upload.php3.23 ▲0.0035.70 ▲2.53

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Staging Users Control
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.25 ▼0.101.85 ▲0.3143.91 ▲2.71
Dashboard /wp-admin2,198 ▲185.61 ▼0.0482.37 ▼2.2836.92 ▼6.41
Posts /wp-admin/edit.php2,103 ▼02.01 ▲0.0234.70 ▼4.3730.74 ▼14.17
Add New Post /wp-admin/post-new.php1,526 ▼023.07 ▼0.66648.85 ▼27.7059.69 ▲6.51
Media Library /wp-admin/upload.php1,400 ▼04.19 ▲0.0194.57 ▼7.2141.46 ▼2.83

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Parse error
      syntax error, unexpected '}', expecting end of file in wp-content/plugins/staging-users-control/staging-users-control.php on line 41

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% 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: Please replace "Plugin Name" with the name of your plugin on the first line ( === staging-users-control === )
  • Screenshots: These screenshots do not have images: #1 (This is the plugin settings page, under Settings > Staging Users Control.), #2 (This is the users profile page, showing the new checkbox to allow users to login into the LIVE env.), #3 (You can show a message on the live site for users to notice they are logging on the LIVE site.)
  • Donate link: Invalid URI found ("None.")
Please take inspiration from this readme.txt

staging-users-control/staging-users-control.php Passed 13 tests

This is the main PHP file of "Staging Users Control" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
139 characters long description:
A plugin to prevent certain users from logging into the back-end in the LIVE environment. You can let your users edit staging but not live.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin280 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12642280

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity3.82
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png30.04KB16.20KB▼ 46.07%
screenshot-3.png16.96KB7.21KB▼ 57.47%
screenshot-2.png8.61KB4.76KB▼ 44.74%