83% wp-simple-and-nice-preloader

Code Review | WP Simple and Nice Preloader

WordPress plugin WP Simple and Nice Preloader scored 83% from 54 tests.

About plugin

  • Plugin page: wp-simple-and-nic...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 6.3.1
  • First release: Oct 31, 2014
  • Latest release: Nov 1, 2014
  • Number of updates: 12
  • Update frequency: every 0.5 days
  • Top authors: shawon.info (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 5,158 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by WP Simple and Nice Preloader
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.61 ▼2.08
Dashboard /wp-admin3.31 ▲0.0146.28 ▲0.67
Posts /wp-admin/edit.php3.36 ▲0.0143.03 ▼2.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0180.84 ▼19.21
Media Library /wp-admin/upload.php3.23 ▲0.0138.08 ▲7.00

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 186 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
wpsnp_color
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
wpsnp_theme
theysaidso_admin_options
db_upgraded
wpsnp_ietheme

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Simple and Nice Preloader
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲9813.30 ▼1.077.60 ▲4.8947.41 ▲1.44
Dashboard /wp-admin2,206 ▲184.88 ▼0.97104.43 ▲2.2481.42 ▲38.15
Posts /wp-admin/edit.php2,101 ▲152.01 ▼0.0034.41 ▼2.0834.32 ▲1.41
Add New Post /wp-admin/post-new.php1,541 ▲2223.16 ▲0.02711.15 ▲45.7458.01 ▲5.20
Media Library /wp-admin/upload.php1,406 ▲184.17 ▼0.0199.03 ▼7.3545.73 ▲3.00

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

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
Good news, no errors were detected

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-simple-and-nice-preloader/wpsnp_preloader.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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 need to be fixed:
  • Donate link: Please fix this invalid url: ""
The official readme.txt is a good inspiration

wp-simple-and-nice-preloader/wpsnp_preloader.php 85% from 13 tests

The principal PHP file in "WP Simple and Nice Preloader" v. 1.0.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-simple-and-nice-preloader.php" instead of "wpsnp_preloader.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin11,154 lines of code in 144 files:
LanguageFilesBlank linesComment linesLines of code
CSS1411,09214110,146
JavaScript11020819
PHP2117189

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected