78% password-protect-staging

Code Review | Password Protect Staging

WordPress plugin Password Protect Staging scored78%from 54 tests.

About plugin

  • Plugin page: password-protect-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5+
  • WordPress version: 6.3.1
  • First release: Oct 16, 2014
  • Latest release: Oct 16, 2014
  • Number of updates: 3
  • Update frequency: every 4.3 days
  • Top authors: benlumley (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /5,461 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.63ms] Passed 4 tests

This is a short check of server-side resources used by Password Protect Staging
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0136.90 ▼1.46
Dashboard /wp-admin3.33 ▲0.0343.64 ▼6.17
Posts /wp-admin/edit.php3.38 ▲0.0345.80 ▼1.03
Add New Post /wp-admin/post-new.php5.91 ▲0.0389.33 ▼8.23
Media Library /wp-admin/upload.php3.25 ▲0.0334.20 ▼2.65
Password Protect Staging /wp-admin/options-general.php?page=password-protect-staging3.1929.21

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Password Protect Staging
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.71 ▼0.964.27 ▲2.6343.81 ▼5.00
Dashboard /wp-admin2,213 ▲284.80 ▼1.06106.94 ▲3.7641.31 ▲2.33
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0140.28 ▲0.0235.53 ▼1.66
Add New Post /wp-admin/post-new.php1,538 ▲1923.25 ▼0.17596.54 ▼49.7349.42 ▼1.56
Media Library /wp-admin/upload.php1,386 ▲14.23 ▲0.0395.49 ▼22.7643.99 ▼3.53
Password Protect Staging /wp-admin/options-general.php?page=password-protect-staging7852.0324.5327.20

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=password-protect-staging
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=password-protect-staging
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
  • 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/password-protect-staging/password-protect-staging.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tested up to: Version not formatted correctly
You can take inspiration from this readme.txt

password-protect-staging/password-protect-staging.php Passed 13 tests

The main PHP script in "Password Protect Staging" version 1.0.0 is automatically included on every request by WordPress
86 characters long description:
Puts a HTTP auth on staging. Just to keep search engines out, passwords in clear text!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected108 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11939108

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
There were not PNG files found in your plugin