10% stylish-preloader

Code Review | Stylish Preloader

WordPress plugin Stylish Preloader scored 10% from 54 tests.

About plugin

  • Plugin page: stylish-preloader
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.5
  • WordPress version: 5.8.1
  • First release: Aug 22, 2020
  • Latest release: Aug 22, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: ahmad22 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 638 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/stylish-preloader/index.php+51
    Undefined variable: key

Server metrics [RAM: ▲0.03MB] [CPU: ▼149.65ms] Passed 4 tests

Server-side resources used by Stylish Preloader
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1546.39 ▲23.80
Dashboard /wp-admin3.09 ▲0.0451.04 ▲0.53
Posts /wp-admin/edit.php3.14 ▲0.0451.53 ▼2.70
Add New Post /wp-admin/post-new.php5.45 ▲0.0292.13 ▼596.83
Media Library /wp-admin/upload.php3.03 ▲0.0334.96 ▲0.41
Stylish Preloader /wp-admin/options-general.php?page=StylishPreloaderAdminMainPage3.0031.13

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 110 new files
Database: 1 new table, 1 new option
New tables
wp_preloader_table
New WordPress options
test_db_version

Browser metrics Passed 4 tests

Checking browser requirements for Stylish Preloader
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,801 ▲20516.31 ▲0.7912.92 ▲3.9452.09 ▼0.68
Dashboard /wp-admin2,984 ▲535.92 ▼0.07145.74 ▼10.26101.62 ▼10.17
Posts /wp-admin/edit.php2,750 ▲112.73 ▲0.0368.46 ▼2.9185.77 ▼18.29
Add New Post /wp-admin/post-new.php1,624 ▼5921.48 ▲3.03271.39 ▼114.82114.35 ▲1.70
Media Library /wp-admin/upload.php1,818 ▲115.03 ▲0.00152.69 ▲0.17107.42 ▼25.63
Stylish Preloader /wp-admin/options-general.php?page=StylishPreloaderAdminMainPage1,4702.1062.3397.50

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_preloader_table
  • This plugin does not fully uninstall, leaving 1 option in the database
    • test_db_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
Please fix the following items
  • 1× 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/stylish-preloader/admin/admin.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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: You can look at the official readme.txt

stylish-preloader/index.php 92% from 13 tests

The main PHP file in "Stylish Preloader" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("stylish-preloader.php" instead of "index.php")

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
There were no executable files found in this plugin15,331 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
CSS61335,047
SVG8003,473
Sass1638373,238
LESS1638493,226
PHP2631290
JavaScript361857

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
9 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/3.png2.78KB0.42KB▼ 84.77%
admin/images/8.png3.44KB0.72KB▼ 78.98%
admin/images/4.png2.50KB0.46KB▼ 81.70%
admin/images/2.png8.46KB2.86KB▼ 66.20%
admin/images/7.png3.41KB0.70KB▼ 79.50%