72% wp-flatadmin

Code Review | WP Flat Admin Theme

WordPress plugin WP Flat Admin Theme scored72%from 54 tests.

About plugin

  • Plugin page: wp-flatadmin
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 6.3.1
  • First release: Aug 29, 2015
  • Latest release: Sep 29, 2015
  • Number of updates: 12
  • Update frequency: every 2.6 days
  • Top authors: nickhargreaves (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /3,386 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by WP Flat Admin Theme
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0146.50 ▲2.75
Dashboard /wp-admin3.32 ▲0.0244.57 ▼8.89
Posts /wp-admin/edit.php3.37 ▲0.0149.02 ▼0.45
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.50 ▼7.13
Media Library /wp-admin/upload.php3.25 ▲0.0142.01 ▲0.63
WP Flat Admin /wp-admin/options-general.php?page=wpflatadmin3.2438.27

Server storage [IO: ▲8.37MB] [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: 273 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Flat Admin Theme
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲8014.39 ▲0.021.63 ▼0.9541.03 ▼17.95
Dashboard /wp-admin2,208 ▲205.83 ▼0.07105.41 ▼3.2766.22 ▲26.87
Posts /wp-admin/edit.php2,100 ▲142.02 ▲0.0244.02 ▲5.3569.99 ▲34.10
Add New Post /wp-admin/post-new.php1,674 ▲15522.37 ▼1.08714.96 ▼48.5462.24 ▼5.55
Media Library /wp-admin/upload.php1,393 ▲114.19 ▼0.01109.31 ▼30.4068.50 ▲22.50
WP Flat Admin /wp-admin/options-general.php?page=wpflatadmin1,0013.0144.6343.81

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpflatadmin
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
    Trying to get property 'ID' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpflatadmin
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpflatadmin
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpflatadmin
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object

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
Please fix the following
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-flatadmin/inc/login.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-flatadmin/login/add_menu.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-flatadmin/index.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/wp-flatadmin/login/config_options.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-flatadmin/login/login.php:17

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=wpflatadmin
    • > Network (severe)
    wp-content/plugins/wp-flatadmin/assets/js/logo-uploader.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: admin, flat ui admin, login, flat theme, admin login...

wp-flatadmin/index.php 92% from 13 tests

Analyzing the main PHP file in "WP Flat Admin Theme" version 1.0.1
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-flatadmin.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected62,182 lines of code in 136 files:
LanguageFilesBlank linesComment linesLines of code
SVG220128,376
JavaScript101,9872,23311,355
CSS654857,235
LESS631,0378586,326
HTML226392246,064
JSON5002,516
Markdown3760190
PHP53534120

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
47 PNG files occupy 0.53MB with 0.30MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Flat-UI/dist/img/icons/png/Retina-Ready.png10.19KB4.67KB▼ 54.13%
Flat-UI/docs/assets/img/demo/html-icon.png4.24KB1.89KB▼ 55.49%
Flat-UI/img/login/imac-2x.png21.77KB8.56KB▼ 60.68%
Flat-UI/dist/img/icons/png/Chat.png4.16KB1.97KB▼ 52.74%
Flat-UI/img/login/icon.png7.33KB3.18KB▼ 56.59%