90% flat-preloader

Code Review | Flat Preloader

WordPress plugin Flat Preloader scored90%from 54 tests.

About plugin

  • Plugin page: flat-preloader
  • Plugin version: 1.16.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Jan 5, 2016
  • Latest release: May 2, 2023
  • Number of updates: 51
  • Update frequency: every 52.5 days
  • Top authors: tatthiennguyen (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

5,000+ active /71,592 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.43ms] Passed 4 tests

Server-side resources used by Flat Preloader
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0843.92 ▲6.38
Dashboard /wp-admin3.38 ▲0.0853.48 ▲3.52
Posts /wp-admin/edit.php3.43 ▲0.0847.58 ▼7.39
Add New Post /wp-admin/post-new.php5.96 ▲0.0880.44 ▼14.18
Media Library /wp-admin/upload.php3.30 ▲0.0836.14 ▲0.33
Flat Preloader /wp-admin/options-general.php?page=flat-preloader3.2735.84

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 131 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Flat Preloader
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲12013.81 ▼0.448.97 ▲7.1340.85 ▼0.83
Dashboard /wp-admin2,201 ▲215.54 ▼0.1384.17 ▼9.2942.82 ▲3.67
Posts /wp-admin/edit.php2,106 ▲32.02 ▲0.0134.22 ▼7.2229.23 ▼9.18
Add New Post /wp-admin/post-new.php1,531 ▼723.03 ▲4.96694.23 ▲106.0559.08 ▼18.47
Media Library /wp-admin/upload.php1,409 ▲94.26 ▲0.0494.44 ▼4.2441.88 ▼0.15
Flat Preloader /wp-admin/options-general.php?page=flat-preloader2,6281.6825.20217.24

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

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

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === flat-preloader === )
The official readme.txt is a good inspiration

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

"Flat Preloader" version 1.16.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
47 characters long description:
Create preloading page with many various styles

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin492 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP351167309
CSS2360127
JavaScript110251
make1105

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/how-to-get-post-id.png27.23KB9.16KB▼ 66.38%
admin/img/wp-block-mindmap-200.png16.02KB5.78KB▼ 63.92%