94% as-login

Code Review | AS login

WordPress plugin AS login scored 94% from 54 tests.

About plugin

  • Plugin page: as-login
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.5.2
  • WordPress version: 5.8.1
  • First release: Aug 9, 2015
  • Latest release: Nov 17, 2016
  • Number of updates: 12
  • Update frequency: every 38.8 days
  • Top authors: anuislam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,677 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼140.02ms] Passed 4 tests

Analyzing server-side resources used by AS login
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.2028.52 ▲6.81
Dashboard /wp-admin3.25 ▲0.1947.75 ▲0.85
Posts /wp-admin/edit.php3.29 ▲0.1947.41 ▲7.62
Add New Post /wp-admin/post-new.php5.52 ▲0.0892.81 ▼566.77
Media Library /wp-admin/upload.php3.10 ▲0.1033.71 ▼0.97

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for AS login
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,923 ▲32717.61 ▲1.9512.19 ▲3.5343.01 ▼3.05
Dashboard /wp-admin3,202 ▲2718.35 ▲2.30158.01 ▲11.56122.27 ▲14.08
Posts /wp-admin/edit.php3,031 ▲2924.51 ▲1.6877.24 ▲13.29119.20 ▲38.55
Add New Post /wp-admin/post-new.php1,539 ▼6516.69 ▼2.17362.30 ▼7.15113.91 ▼0.04
Media Library /wp-admin/upload.php1,797 ▼104.94 ▼0.11113.69 ▼35.23133.35 ▲14.24

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/as-login/inc/as-functions.php:105
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/as-login/as-login.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/as-login/inc/as-opt-functions.php:80

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% 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
Attributes that need to be fixed:
  • Tags: There are too many tags (145 tag instead of maximum 10)
Please take inspiration from this readme.txt

as-login/as-login.php Passed 13 tests

The main PHP file in "AS login" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
54 characters long description:
AS login you can fully customize wordpress login page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected943 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS250462
PHP314332402
JavaScript2141379

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions36
▷ Named functions36100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.14MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/github.png16.12KB2.46KB▼ 84.75%
inc/admin-ico.png14.52KB0.63KB▼ 95.68%
inc/wordpress.png20.26KB3.38KB▼ 83.33%
inc/upwork.png18.35KB3.40KB▼ 81.46%
inc/right.png15.12KB1.31KB▼ 91.31%