83% sweet-sharmin-preloader

Code Review | Sweet Sharmin Preloader

WordPress plugin Sweet Sharmin Preloader scored83%from 54 tests.

About plugin

  • Plugin page: sweet-sharmin-pre...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Jan 1, 2016
  • Latest release: Jan 2, 2016
  • Number of updates: 11
  • Update frequency: every 0.2 days
  • Top authors: yeasin62 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /555 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by Sweet Sharmin Preloader
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.10 ▼3.65
Dashboard /wp-admin3.31 ▼0.0450.54 ▼10.23
Posts /wp-admin/edit.php3.37 ▲0.0046.05 ▼2.40
Add New Post /wp-admin/post-new.php5.90 ▲0.0079.26 ▼12.79
Media Library /wp-admin/upload.php3.24 ▲0.0035.06 ▲1.61

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Sweet Sharmin Preloader: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,903 ▲11713.51 ▼0.989.82 ▲7.8842.18 ▼2.30
Dashboard /wp-admin2,195 ▲185.49 ▼0.1898.90 ▲12.0241.45 ▼2.57
Posts /wp-admin/edit.php2,100 ▲31.99 ▲0.0233.93 ▼4.7236.23 ▼3.22
Add New Post /wp-admin/post-new.php1,526 ▼023.02 ▼0.62643.72 ▼14.2650.57 ▼4.19
Media Library /wp-admin/upload.php1,403 ▲34.19 ▲0.03102.25 ▼3.4648.34 ▲1.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sweet-sharmin-preloader/sweet_sharmin_preloader.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (Screenshot 1) image not found
  • Contributors: Plugin contributors field is missing
You can take inspiration from this readme.txt

sweet-sharmin-preloader/sweet_sharmin_preloader.php 92% from 13 tests

The entry point to "Sweet Sharmin Preloader" version 1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("sweet-sharmin-preloader.php" instead of "sweet_sharmin_preloader.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected48 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP141229
CSS11019

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions4
▷ Named functions4100.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
3 PNG files occupy 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png43.34KB18.81KB▼ 56.58%
images/bg.png1.36KB0.34KB▼ 74.93%
assets/Screenshot-1.png30.86KB9.55KB▼ 69.06%