83% jeba-wp-preloader

Code Review | Jeba WP Preloader

WordPress plugin Jeba WP Preloader scored83%from 54 tests.

About plugin

  • Plugin page: jeba-wp-preloader
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2
  • WordPress version: 6.3.1
  • First release: May 8, 2015
  • Latest release: May 8, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: jahed (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /896 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.05ms] Passed 4 tests

This is a short check of server-side resources used by Jeba WP Preloader
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0427.07 ▼13.28
Dashboard /wp-admin3.37 ▲0.0646.71 ▼1.87
Posts /wp-admin/edit.php3.42 ▲0.0645.31 ▼2.33
Add New Post /wp-admin/post-new.php5.96 ▲0.0896.26 ▲2.47
Media Library /wp-admin/upload.php3.29 ▲0.0634.90 ▼2.70
Preloader Settings /wp-admin/options-general.php?page=preloader-settings3.2629.09

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Jeba WP Preloader
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,033 ▲28713.81 ▼0.6212.04 ▲10.3040.39 ▼3.01
Dashboard /wp-admin2,231 ▲495.09 ▼0.7798.11 ▼6.4737.99 ▼1.37
Posts /wp-admin/edit.php2,119 ▲302.32 ▲0.2835.42 ▼8.2532.58 ▼3.18
Add New Post /wp-admin/post-new.php1,542 ▲1118.41 ▼4.92614.56 ▲25.5134.55 ▼14.91
Media Library /wp-admin/upload.php1,413 ▲284.35 ▲0.15105.63 ▲7.0250.39 ▲6.90
Preloader Settings /wp-admin/options-general.php?page=preloader-settings1,2162.3448.0872.71

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jeba-wp-preloader/main-functions.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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:
  • Screenshots: These screenshots require images: #1 (Installed in demo server.), #2 (Another demo.)
  • Contributors: The plugin contributors field is not present
You can take inspiration from this readme.txt

jeba-wp-preloader/main-functions.php 92% from 13 tests

The main PHP file in "Jeba WP Preloader" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("jeba-wp-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
Everything looks great! No dangerous files found in this plugin652 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP110323473
CSS3356167
JavaScript26112

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
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/preloader4.png1.52KB0.92KB▼ 39.28%
css/img/preloader14.png1.39KB0.38KB▼ 72.89%
css/img/preloader17.png1.60KB0.52KB▼ 67.52%
css/img/preloader7.png1.72KB0.77KB▼ 55.23%
css/img/preloader22.png2.97KB1.54KB▼ 47.96%