68% loading-screen-by-imoptimal

Code Review | Loading Screen by Imoptimal

WordPress plugin Loading Screen by Imoptimal scored68%from 54 tests.

About plugin

  • Plugin page: loading-screen-by...
  • Plugin version: 1.2.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-5.5.1
  • WordPress version: 6.3.1
  • First release: Mar 11, 2020
  • Latest release: Oct 28, 2020
  • Number of updates: 17
  • Update frequency: every 13.7 days
  • Top authors: imoptimal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /641 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.92MB] [CPU: ▼36.39ms] Passed 4 tests

An overview of server-side resources used by Loading Screen by Imoptimal
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0725.21 ▼17.25
Dashboard /wp-admin3.03 ▼0.3124.26 ▼35.88
Posts /wp-admin/edit.php3.03 ▼0.3228.21 ▼16.84
Add New Post /wp-admin/post-new.php3.03 ▼2.8626.21 ▼75.58
Media Library /wp-admin/upload.php3.03 ▼0.2022.73 ▼10.01
Loading Screen by Imoptimal /wp-admin/options-general.php?page=imoload_loading3.0324.47

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Loading Screen by Imoptimal
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,949 ▲20313.68 ▼1.078.52 ▲6.4542.31 ▼10.40
Dashboard /wp-admin2,213 ▲255.86 ▲0.96106.32 ▼9.7641.50 ▼3.95
Posts /wp-admin/edit.php2,072 ▼202.04 ▲0.0538.74 ▲0.5635.14 ▲1.15
Add New Post /wp-admin/post-new.php1,535 ▲1623.26 ▲0.04677.90 ▲26.2954.10 ▼2.16
Media Library /wp-admin/upload.php1,386 ▲44.30 ▲0.0894.00 ▼4.6943.38 ▼0.93
Loading Screen by Imoptimal /wp-admin/options-general.php?page=imoload_loading1,1943.2142.0885.48

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/loading-screen-by-imoptimal/inc/register-settings.php+68
    Trying to access array offset on value of type bool
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=imoload_loading
    • > Notice in wp-content/plugins/loading-screen-by-imoptimal/inc/register-settings.php+68
    Trying to access array offset on value of type bool

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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/loading-screen-by-imoptimal/inc/enqueue-resources.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/loading-screen-by-imoptimal/inc/register-settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: loading screen, loading

loading-screen-by-imoptimal/imoptimal-loading.php 77% from 13 tests

"Loading Screen by Imoptimal" version 1.2.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 143 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("loading-screen-by-imoptimal.php" instead of "imoptimal-loading.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin2,395 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript63561801,675
PHP610144426
CSS4515294

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods1100.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/imoptimal-logo-white.png7.83KB4.28KB▼ 45.33%