84% global-post-password

Code Review | Global Post Password

WordPress plugin Global Post Password scored84%from 54 tests.

About plugin

  • Plugin page: global-post-password
  • Plugin version: 1.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.2
  • WordPress version: 6.3.1
  • First release: Sep 22, 2007
  • Latest release: Jun 13, 2019
  • Number of updates: 25
  • Update frequency: every 171.4 days
  • Top authors: johnbillion (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /21,288 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼1.46ms] Passed 4 tests

An overview of server-side resources used by Global Post Password
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0554.25 ▲9.98
Dashboard /wp-admin3.38 ▲0.0851.46 ▼6.77
Posts /wp-admin/edit.php3.49 ▲0.1451.31 ▼4.94
Add New Post /wp-admin/post-new.php5.96 ▲0.0799.97 ▲5.10
Media Library /wp-admin/upload.php3.30 ▲0.0738.22 ▲0.77
Global Post Password /wp-admin/options-general.php?page=globalpostpassword3.2735.61

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Global Post Password
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.39 ▼0.142.17 ▲0.4141.95 ▼2.12
Dashboard /wp-admin2,202 ▲225.68 ▲0.0791.05 ▼12.8640.66 ▼2.25
Posts /wp-admin/edit.php2,118 ▲152.02 ▲0.0736.57 ▼7.0233.99 ▼2.28
Add New Post /wp-admin/post-new.php1,531 ▲523.34 ▼0.42654.89 ▲22.0352.08 ▼4.85
Media Library /wp-admin/upload.php1,398 ▲44.20 ▼0.0096.89 ▼7.1842.02 ▼2.57
Global Post Password /wp-admin/options-general.php?page=globalpostpassword8611.6727.7627.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/global-post-password/global-post-password.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: post, password, privacy

global-post-password/global-post-password.php 92% from 13 tests

The main PHP file in "Global Post Password" ver. 1.5.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected350 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15527318
JavaScript18232

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods2180.77%
▷ Protected methods519.23%
▷ Private methods00.00%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected