84% page-guard

Code Review | Page Guard

WordPress plugin Page Guard scored84%from 54 tests.

About plugin

  • Plugin page: page-guard
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0.1
  • WordPress version: 6.3.1
  • First release: Mar 21, 2017
  • Latest release: Aug 22, 2022
  • Number of updates: 5
  • Update frequency: every 395.4 days
  • Top authors: fculross (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /502 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.67ms] Passed 4 tests

A check of server-side resources used by Page Guard
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.24 ▼2.63
Dashboard /wp-admin3.31 ▲0.0149.36 ▲0.19
Posts /wp-admin/edit.php3.36 ▲0.0152.45 ▲1.18
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.32 ▼6.62
Media Library /wp-admin/upload.php3.23 ▲0.0137.17 ▼1.61

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Page Guard
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲2814.75 ▲0.401.75 ▼0.4340.24 ▼6.75
Dashboard /wp-admin2,195 ▲185.56 ▲0.0392.85 ▼9.3642.20 ▲0.89
Posts /wp-admin/edit.php2,100 ▲31.99 ▼0.0239.38 ▲2.2536.60 ▼0.86
Add New Post /wp-admin/post-new.php1,526 ▼223.07 ▲0.12712.22 ▲92.7955.74 ▼9.71
Media Library /wp-admin/upload.php1,397 ▼04.18 ▲0.0099.22 ▲1.4641.27 ▼2.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/page-guard/pageguard.php:51

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

page-guard/pageguard.php 92% from 13 tests

The entry point to "Page Guard" version 1.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("page-guard.php" instead of "pageguard.php")

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
No dangerous file extensions were detected32 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1154332

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected