94% access-category-password

Code Review | Access Category Password

WordPress plugin Access Category Password scored 94% from 54 tests.

About plugin

  • Plugin page: access-category-p...
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3
  • WordPress version: 5.9.2
  • First release: Sep 20, 2014
  • Latest release: Oct 24, 2019
  • Number of updates: 59
  • Update frequency: every 31.5 days
  • Top authors: jojaba (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

4,000+ active / 33,267 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼296.65ms] Passed 4 tests

This is a short check of server-side resources used by Access Category Password
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.1762.56 ▲5.47
Dashboard /wp-admin3.53 ▲0.1234.86 ▼6.12
Posts /wp-admin/edit.php3.76 ▲0.1249.95 ▲6.72
Add New Post /wp-admin/post-new.php7.00 ▲0.0297.23 ▼1,192.66
Media Library /wp-admin/upload.php3.41 ▲0.1151.62 ▲27.51
Access Category Password /wp-admin/options-general.php?page=acpwd_options_page3.3927.34

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Access Category Password
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,791 ▲3715.94 ▲0.346.13 ▲0.211.97 ▼0.54
Dashboard /wp-admin2,897 ▲366.13 ▼0.08117.20 ▼21.68157.82 ▼59.80
Posts /wp-admin/edit.php2,696 ▲23.24 ▲0.0182.80 ▲17.21140.09 ▼8.21
Add New Post /wp-admin/post-new.php1,686 ▲2517.48 ▲1.10391.50 ▼48.23172.39 ▼1.04
Media Library /wp-admin/upload.php1,703 ▲145.52 ▼0.02144.99 ▼3.32189.27 ▼30.80
Access Category Password /wp-admin/options-general.php?page=acpwd_options_page1,4732.7064.26202.38

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/access-category-password/access-category-password.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
3 plugin tags: protect, category, password

access-category-password/access-category-password.php Passed 13 tests

The main PHP file in "Access Category Password" ver. 1.5.1 adds more information about the plugin and also serves as the entry point for this plugin
88 characters long description:
Protects posts in categories by setting a unique Password for all restricted categories.

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
Good job! No executable or dangerous file extensions detected1,432 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PO File35501,029884
PHP28797548

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin