89% access-guard

Code Review | Access Guard

WordPress plugin Access Guard scored89%from 54 tests.

About plugin

  • Plugin page: access-guard
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5+
  • WordPress version: 6.3.1
  • First release: Oct 15, 2023
  • Latest release: Oct 17, 2023
  • Number of updates: 9
  • Update frequency: every 0.3 days
  • Top authors: nitin247 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /33 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.00MB] [CPU: ▼7.56ms] Passed 4 tests

Server-side resources used by Access Guard
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.94 ▲1.35
Dashboard /wp-admin3.32 ▼0.0245.92 ▼10.27
Posts /wp-admin/edit.php3.37 ▲0.0242.70 ▼0.79
Add New Post /wp-admin/post-new.php5.90 ▲0.0176.53 ▼20.51
Media Library /wp-admin/upload.php3.24 ▲0.0138.19 ▲2.77

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Access Guard
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.05 ▼0.521.76 ▲0.1244.02 ▲7.10
Dashboard /wp-admin2,214 ▲375.64 ▼0.0288.33 ▲1.7242.12 ▲0.81
Posts /wp-admin/edit.php2,116 ▲191.99 ▼0.0135.64 ▲2.3433.95 ▼3.90
Add New Post /wp-admin/post-new.php1,551 ▲2522.60 ▼0.54695.04 ▲68.7052.39 ▲2.29
Media Library /wp-admin/upload.php1,413 ▲194.26 ▲0.07108.75 ▲7.8247.38 ▲3.08

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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 90% from 29 tests

readme.txt 81% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Requires at least: Version format is invalid
  • Tested up to: Version format is invalid
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
Please take inspiration from this readme.txt

access-guard/access-guard.php Passed 13 tests

"Access Guard" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
90 characters long description:
Enhance access protection, control user permissions, and provide IP banning functionality.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected205 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24417204
CSS1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1376.47%
▷ Protected methods00.00%
▷ Private methods423.53%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected