84% ag-custom-admin

Code Review | AGCA - Custom Dashboard & Login Page

WordPress plugin AGCA - Custom Dashboard & Login Page scored84%from 54 tests.

About plugin

  • Plugin page: ag-custom-admin
  • Plugin version: 7.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 19, 2011
  • Latest release: Jul 21, 2023
  • Number of updates: 588
  • Update frequency: every 7.6 days
  • Top authors: argonius (82.31%)cusmin (17.86%)

Code review

54 tests

User reviews

65 reviews

Install metrics

30,000+ active /939,350 total downloads

Benchmarks

Plugin footprint 83% 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.58MB] [CPU: ▲9.94ms] Passed 4 tests

This is a short check of server-side resources used by AGCA - Custom Dashboard & Login Page
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.00 ▲0.5452.52 ▲11.31
Dashboard /wp-admin3.90 ▲0.6062.25 ▲12.37
Posts /wp-admin/edit.php3.99 ▲0.6367.04 ▲15.37
Add New Post /wp-admin/post-new.php6.46 ▲0.5799.39 ▲0.72
Media Library /wp-admin/upload.php3.82 ▲0.5955.24 ▲20.95
AGCA /wp-admin/tools.php?page=ag-custom-admin/plugin.php3.8567.59

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 54 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for AGCA - Custom Dashboard & Login Page
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,247 ▲50113.93 ▼0.368.65 ▲6.9541.63 ▼3.44
Dashboard /wp-admin2,627 ▲4395.14 ▲0.29108.87 ▼8.6137.89 ▼7.93
Posts /wp-admin/edit.php2,494 ▲4082.33 ▲0.3140.42 ▲3.5233.87 ▼10.04
Add New Post /wp-admin/post-new.php1,613 ▲8523.89 ▲5.21647.24 ▼6.2351.99 ▼0.94
Media Library /wp-admin/upload.php1,795 ▲4104.46 ▲0.2997.09 ▼3.9243.32 ▼0.37
AGCA /wp-admin/tools.php?page=ag-custom-admin/plugin.php6,3258.84249.92233.30

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

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

Smoke tests 75% from 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Codeception\\Actor' not found in wp-content/plugins/ag-custom-admin/tests/_support/UnitTester.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Codeception\\Module' not found in wp-content/plugins/ag-custom-admin/tests/_support/Helper/Functional.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'AcceptanceTester' not found in wp-content/plugins/ag-custom-admin/tests/acceptance/AGCAInstalledCept.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Codeception\\Actor' not found in wp-content/plugins/ag-custom-admin/tests/_support/FunctionalTester.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Codeception\\Actor' not found in wp-content/plugins/ag-custom-admin/tests/_support/AcceptanceTester.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ag-custom-admin/plugin.php:40
    • > PHP Fatal error
      Uncaught Error: Class 'Codeception\\Module' not found in wp-content/plugins/ag-custom-admin/tests/_support/Helper/Acceptance.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Page\\AGCAPage' not found in wp-content/plugins/ag-custom-admin/tests/_support/Page/GeneralPage.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Codeception\\Module' not found in wp-content/plugins/ag-custom-admin/tests/_support/Helper/Unit.php:7

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can take inspiration from this readme.txt

ag-custom-admin/plugin.php 92% from 13 tests

"AGCA - Custom Dashboard & Login Page" version 7.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ag-custom-admin.php" instead of "plugin.php")

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 detected7,530 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP199144,2283,893
PO File26597101,464
CSS3190231,137
JavaScript29956869
HTML16088
YAML431750
SVG30024
JSON1005
SQL1010

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity23.29
▷ Minimum class complexity1.00
▷ Maximum class complexity298.00
Average method complexity1.76
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces3
Interfaces0
Traits3
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods387
▷ Static methods20.52%
▷ Public methods38298.71%
▷ Protected methods30.78%
▷ Private methods20.52%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants7
▷ Global constants7100.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
6 PNG files occupy 0.45MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/donate-btn.png14.49KB4.79KB▼ 66.93%
images/agca-background.png420.58KB268.58KB▼ 36.14%
images/cusminlogo.png12.03KB3.14KB▼ 73.93%
style/mask.png1.97KB4.18KB0.00%
style/marker.png0.64KB0.71KB0.00%