84% flat-login

Code Review | Flat Login

WordPress plugin Flat Login scored84%from 54 tests.

About plugin

  • Plugin page: flat-login
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.3.1
  • WordPress version: 6.3.1
  • First release: Jan 26, 2015
  • Latest release: Oct 5, 2015
  • Number of updates: 18
  • Update frequency: every 14.0 days
  • Top authors: IMohammad (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,818 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.75ms] Passed 4 tests

Server-side resources used by Flat Login
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0744.53 ▲0.47
Dashboard /wp-admin3.36 ▲0.0654.66 ▲1.64
Posts /wp-admin/edit.php3.41 ▲0.0548.74 ▼2.49
Add New Post /wp-admin/post-new.php5.94 ▲0.0589.42 ▼18.62
Media Library /wp-admin/upload.php3.28 ▲0.0543.54 ▲7.87

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 13 new options
New WordPress options
flat_logo_width
widget_recent-posts
can_compress_scripts
flat_logo_upload
flat_bg_color
flat_logo_height
flat_logo_title
widget_theysaidso_widget
flat_logo_url
widget_recent-comments
...

Browser metrics Passed 4 tests

A check of browser resources used by Flat Login
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.42 ▲0.231.93 ▲0.4244.59 ▲4.44
Dashboard /wp-admin2,210 ▲295.52 ▼0.2094.73 ▼17.0879.55 ▲34.52
Posts /wp-admin/edit.php2,115 ▲151.99 ▼0.0235.24 ▼5.6133.67 ▼2.75
Add New Post /wp-admin/post-new.php1,555 ▲2723.06 ▼0.03655.66 ▲20.0949.19 ▼20.98
Media Library /wp-admin/upload.php1,409 ▲94.12 ▼0.0599.47 ▼1.7465.95 ▲23.31

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/flat-login/inc/flat-login-settings.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/flat-login/inc/flat-login-functions.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/flat-login/flat-login.php:15

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

readme.txt 88% 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
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Preview)
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
You can look at the official readme.txt

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

The main PHP file in "Flat Login" ver. 2.3 adds more information about the plugin and also serves as the entry point for this plugin
78 characters long description:
A WordPress plugin that changes your usual wordpress login page to a flat one.

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
There were no executable files found in this plugin597 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS32814246
PHP42810201
JavaScript319477
PO File1232373

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.14MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/chekmark.png15.17KB0.26KB▼ 98.29%
screenshot-1.png59.26KB10.65KB▼ 82.03%
assets/images/user.png17.83KB0.56KB▼ 96.85%
assets/images/Wordpress-logo.png18.85KB3.73KB▼ 80.21%
assets/images/pass.png17.71KB0.37KB▼ 97.90%