83% my-custom-preloader

Code Review | Custom Preloader in wordpress

WordPress plugin Custom Preloader in wordpress scored83%from 54 tests.

About plugin

  • Plugin page: my-custom-preloader
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-1.0
  • WordPress version: 6.3.1
  • First release: Jun 5, 2016
  • Latest release: May 31, 2016
  • Number of updates: 2
  • Update frequency: every 2.0 days
  • Top authors: Sohelwpexpert (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /599 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼11.62ms] Passed 4 tests

An overview of server-side resources used by Custom Preloader in wordpress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0427.38 ▼16.56
Dashboard /wp-admin3.37 ▲0.0251.77 ▼17.93
Posts /wp-admin/edit.php3.42 ▲0.0647.71 ▼1.91
Add New Post /wp-admin/post-new.php5.96 ▲0.0887.67 ▼10.06
Media Library /wp-admin/upload.php3.29 ▲0.0637.49 ▼0.53
Preloader Settings /wp-admin/options-general.php?page=preloader-settings3.2630.05

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Custom Preloader in wordpress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,047 ▲26113.73 ▼0.6217.93 ▲15.7940.81 ▲0.88
Dashboard /wp-admin2,220 ▲465.74 ▲0.1488.72 ▼2.0539.83 ▼1.84
Posts /wp-admin/edit.php2,127 ▲272.30 ▲0.3036.93 ▼4.3734.12 ▼6.86
Add New Post /wp-admin/post-new.php1,545 ▲1723.23 ▲0.47695.60 ▲34.6836.35 ▼26.34
Media Library /wp-admin/upload.php1,422 ▲194.44 ▲0.23100.65 ▲2.3940.09 ▼1.73
Preloader Settings /wp-admin/options-general.php?page=preloader-settings1,2282.3143.7566.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
  • 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/my-custom-preloader/main-functions.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid URI ("")
  • Screenshots: These screenshots require images: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
You can look at the official readme.txt

my-custom-preloader/main-functions.php 92% from 13 tests

Analyzing the main PHP file in "Custom Preloader in wordpress" version 1.0
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("my-custom-preloader.php" instead of "main-functions.php")

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
No dangerous file extensions were detected650 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP110323473
CSS3356165
JavaScript26112

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.62
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
28 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/img/preloader24.png1.68KB0.72KB▼ 57.18%
css/img/preloader10.png1.78KB0.71KB▼ 60.15%
css/img/preloader2.png1.71KB0.57KB▼ 66.84%
css/img/preloader4.png1.52KB0.92KB▼ 39.28%
css/img/preloader9.png1.50KB0.46KB▼ 69.16%