79% ai-preloader

Code Review | AI Preloader

WordPress plugin AI Preloader scored79%from 54 tests.

About plugin

  • Plugin page: ai-preloader
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Nov 20, 2022
  • Latest release: Apr 17, 2023
  • Number of updates: 11
  • Update frequency: every 13.5 days
  • Top authors: atikul99 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /895 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.05ms] Passed 4 tests

An overview of server-side resources used by AI Preloader
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1139.82 ▼2.07
Dashboard /wp-admin3.48 ▲0.1848.25 ▲0.31
Posts /wp-admin/edit.php3.54 ▲0.1852.79 ▲6.64
Add New Post /wp-admin/post-new.php6.00 ▲0.1177.02 ▼7.21
Media Library /wp-admin/upload.php3.32 ▲0.0934.87 ▲0.77

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for AI Preloader
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,089 ▲35415.72 ▲1.344.92 ▲3.0340.65 ▼7.38
Dashboard /wp-admin2,375 ▲1836.72 ▲1.76134.93 ▲24.4244.27 ▲2.32
Posts /wp-admin/edit.php2,290 ▲2013.63 ▲1.5956.64 ▲20.9236.39 ▲3.12
Add New Post /wp-admin/post-new.php1,548 ▲3123.20 ▲5.53629.72 ▼31.7635.25 ▼15.97
Media Library /wp-admin/upload.php1,433 ▲454.41 ▲0.1579.78 ▼18.4443.12 ▼2.23

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 9× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ai-preloader/templates/style2.php
    • > /wp-content/plugins/ai-preloader/templates/style5.php
    • > /wp-content/plugins/ai-preloader/templates/style6.php
    • > /wp-content/plugins/ai-preloader/templates/style7.php
    • > /wp-content/plugins/ai-preloader/admin/partials/ai-preloader-admin-display.php
    • > /wp-content/plugins/ai-preloader/templates/style3.php
    • > /wp-content/plugins/ai-preloader/public/partials/ai-preloader-public-display.php
    • > /wp-content/plugins/ai-preloader/templates/style4.php
    • > /wp-content/plugins/ai-preloader/templates/style1.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/ai-preloader/admin/partials/admin-menu-page.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/ai-preloader/templates/style0.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: gif, preloader, css, loader, loading

ai-preloader/ai-preloader.php Passed 13 tests

This is the main PHP file of "AI Preloader" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
124 characters long description:
AI Preloader is a static picture or animated css loaders displayed on-screen while the website is loading in the background.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected990 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP21219626519
CSS22332429
JavaScript4146542

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity5.29
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods33
▷ Static methods26.06%
▷ Public methods2884.85%
▷ Protected methods00.00%
▷ Private methods515.15%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin