78% agy-verification

Code Review | Agy verification

WordPress plugin Agy verification scored78%from 54 tests.

About plugin

  • Plugin page: agy-verification
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2
  • WordPress version: 6.3.1
  • First release: Jan 7, 2021
  • Latest release: Apr 17, 2023
  • Number of updates: 27
  • Update frequency: every 30.8 days
  • Top authors: upss1988 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /6,114 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.21MB] [CPU: ▼4.10ms] 75% from 4 tests

This is a short check of server-side resources used by Agy verification
It is recommended to improve the following
  • CPU: You should keep total CPU usage under 500.00ms (currently 912.16ms on /wp-admin/tools.php?page=agy-dashboard)
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1841.53 ▲2.72
Dashboard /wp-admin3.52 ▲0.2245.42 ▲0.43
Posts /wp-admin/edit.php3.63 ▲0.2845.56 ▼1.14
Add New Post /wp-admin/post-new.php6.12 ▲0.2382.89 ▼16.89
Media Library /wp-admin/upload.php3.44 ▲0.2134.30 ▲1.19
Agy Verification /wp-admin/tools.php?page=agy-dashboard3.50912.16

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

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

Browser metrics Passed 4 tests

Agy verification: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7313.26 ▼1.111.74 ▼0.0342.17 ▼1.94
Dashboard /wp-admin2,221 ▲305.80 ▲0.9398.27 ▼7.8038.71 ▼3.21
Posts /wp-admin/edit.php2,104 ▲152.04 ▲0.0337.42 ▼1.3631.38 ▼4.84
Add New Post /wp-admin/post-new.php1,538 ▲523.25 ▼0.31631.50 ▼21.9760.88 ▲10.55
Media Library /wp-admin/upload.php1,403 ▲124.25 ▲0.0797.25 ▲0.6442.22 ▼2.91
Agy Verification /wp-admin/tools.php?page=agy-dashboard1,5952.2225.7340.08

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 17× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      include(AGY_PLUGIN_PATH/public/Agy_Public.php): failed to open stream: No such file or directory in wp-content/plugins/agy-verification/public/template-parts/agy_template_basic.php on line 3
    • > PHP Warning
      include_once(AGY_PLUGIN_PATH/includes/Agy_Dashboard.php): failed to open stream: No such file or directory in wp-content/plugins/agy-verification/public/Agy_Public.php on line 10
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin-install.php' (include_path='.:/usr/share/php') in wp-content/plugins/agy-verification/includes/templates/status-log.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/agy-verification/includes/templates/status-log.php on line 3
    • > PHP Warning
      include(): Failed opening 'AGY_PLUGIN_PATH/public/Agy_Public.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/agy-verification/public/template-parts/agy_template_basic.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin-install.php): failed to open stream: No such file or directory in wp-content/plugins/agy-verification/includes/templates/status-log.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Agy_Dashboard' not found in wp-content/plugins/agy-verification/public/template-parts/agy_template_basic.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/agy-verification/admin/Agy_Admin.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Agy_Dashboard' not found in wp-content/plugins/agy-verification/public/Agy_Public.php:13
    • > PHP Warning
      include(AGY_PLUGIN_PATH/includes/Agy_Dashboard.php): failed to open stream: No such file or directory in wp-content/plugins/agy-verification/public/template-parts/agy_template_basic.php on line 2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=agy-dashboard
    • > Rendering (warning) in unknown
    /wp-admin/tools.php?page=agy-dashboard 182 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: content restriction, age restriction, verification, content verification, age verification...

agy-verification/agy-verification.php 85% from 13 tests

Analyzing the main PHP file in "Agy verification" version 1.2.0
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 188 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected1,264 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP8186165965
CSS2533253
JavaScript47046

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.21
Average class complexity9.75
▷ Minimum class complexity2.00
▷ Maximum class complexity16.00
Average method complexity1.54
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods63
▷ Static methods11.59%
▷ Public methods6095.24%
▷ Protected methods34.76%
▷ Private methods00.00%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants6
▷ Global constants6100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/agy-logo.png15.70KB6.42KB▼ 59.11%