74% wp-access-areas

Code Review | WordPress Access Areas

WordPress plugin WordPress Access Areas scored74%from 54 tests.

About plugin

  • Plugin page: wp-access-areas
  • Plugin version: 1.5.19
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0
  • WordPress version: 6.3.1
  • First release: Jul 18, 2013
  • Latest release: Sep 23, 2022
  • Number of updates: 68
  • Update frequency: every 49.3 days
  • Top authors: podpirate (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

700+ active /28,042 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.46MB] [CPU: ▼4.18ms] Passed 4 tests

A check of server-side resources used by WordPress Access Areas
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1839.87 ▼6.41
Dashboard /wp-admin3.87 ▲0.5755.57 ▼3.33
Posts /wp-admin/edit.php3.96 ▲0.6156.82 ▲4.38
Add New Post /wp-admin/post-new.php6.49 ▲0.6096.37 ▼11.25
Media Library /wp-admin/upload.php3.72 ▲0.4939.35 ▲4.29
Access Areas /wp-admin/users.php?page=user_labels3.8841.80
Access Settings /wp-admin/options-general.php?page=wpaa_settings3.8140.43

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 24 new files
Database: 1 new table, 12 new options
New tables
wp_disclosure_userlabels
New WordPress options
accessareas_version
wpaa_fallback_page
wpaa_default_behavior
widget_recent-comments
widget_theysaidso_widget
wpaa_default_post_status
can_compress_scripts
wpaa_default_caps
theysaidso_admin_options
wpaa_enable_assign_cap
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for WordPress Access Areas
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲3713.13 ▼1.622.01 ▲0.0641.96 ▼2.51
Dashboard /wp-admin2,211 ▲234.88 ▼0.98104.18 ▲0.0541.42 ▲0.75
Posts /wp-admin/edit.php2,498 ▲4092.00 ▼0.1437.91 ▼1.9233.01 ▼3.23
Add New Post /wp-admin/post-new.php6,489 ▲4,95618.73 ▼4.49897.58 ▲232.4363.82 ▼2.09
Media Library /wp-admin/upload.php1,398 ▲164.23 ▲0.00103.00 ▲1.7345.46 ▲0.48
Access Areas /wp-admin/users.php?page=user_labels9272.0527.4626.67
Access Settings /wp-admin/options-general.php?page=wpaa_settings1,5752.2022.8630.62

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/wp-access-areas/inc/class-wpaa_install.php+59
    Non-static method WPAA_Install::_uninstall_custom_caps() should not be called statically
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • theysaidso_admin_options
    • accessareas_version
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/wp-access-areas/inc/class-accessareas_list_table.php:16
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/class-wp-list-table.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wp-access-areas/inc/class-accessareas_list_table.php on line 8
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/wp-access-areas/inc/class-accessareas_list_table.php on line 8
    • > PHP Warning
      Creating default object from empty value in wp-content/plugins/wp-access-areas/inc/class-wpaa_core.php on line 25
    • > PHP Fatal error
      Uncaught Error: Call to undefined method stdClass::set_prefix() in wp-content/plugins/wp-access-areas/inc/class-wpaa_core.php:26
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-access-areas/inc/class-accessareas_list_table.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: security, role, capability, editor, user...

wp-access-areas/wp-access-areas.php 92% from 13 tests

Analyzing the main PHP file in "WordPress Access Areas" version 1.5.19
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 167 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
No dangerous file extensions were detected3,878 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP124593882,931
PO File3302559704
CSS1146132
JavaScript365111

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity47.30
▷ Minimum class complexity6.00
▷ Maximum class complexity97.00
Average method complexity4.40
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods136
▷ Static methods12793.38%
▷ Public methods11483.82%
▷ Protected methods00.00%
▷ Private methods2216.18%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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 images were found in this plugin