84% ajax-loading

Code Review | AJAX Loading

WordPress plugin AJAX Loading scored84%from 54 tests.

About plugin

  • Plugin page: ajax-loading
  • Plugin version: 0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 24, 2022
  • Latest release: Dec 25, 2022
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: maheshmthorat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /695 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by AJAX Loading
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.64 ▼0.21
Dashboard /wp-admin3.36 ▲0.0151.42 ▼10.61
Posts /wp-admin/edit.php3.41 ▲0.0547.80 ▲1.37
Add New Post /wp-admin/post-new.php5.94 ▲0.0584.79 ▼14.17
Media Library /wp-admin/upload.php3.28 ▲0.0533.67 ▼0.49
AJAX Loading /wp-admin/options-general.php?page=wp-ajax-loading-admin3.2230.10

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
_wp_ajax_loading
widget_theysaidso_widget
widget_recent-comments
wp-ajax-loading
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by AJAX Loading
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲19814.06 ▼0.5911.81 ▲10.0942.40 ▲2.54
Dashboard /wp-admin2,212 ▲245.90 ▲1.02113.11 ▲10.5043.29 ▼1.88
Posts /wp-admin/edit.php2,095 ▲62.03 ▼0.0836.01 ▲0.5032.99 ▼0.53
Add New Post /wp-admin/post-new.php1,519 ▼023.28 ▲0.33656.16 ▼34.5248.82 ▼6.14
Media Library /wp-admin/upload.php1,388 ▲64.21 ▼0.0096.38 ▼7.3443.56 ▼1.09
AJAX Loading /wp-admin/options-general.php?page=wp-ajax-loading-admin8492.0523.1343.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • _wp_ajax_loading
    • widget_recent-posts
    • wp-ajax-loading
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-ajax-loading-admin
    • > Notice in wp-content/plugins/ajax-loading/admin/class-wp-ajax-loading-admin.php+83
    Undefined index: con

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: loading, website, ajax

ajax-loading/ajax-loading.php 92% from 13 tests

Analyzing the main PHP file in "AJAX Loading" version 0.2
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin325 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP53083302
SVG20121
CSS1001
JavaScript1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity11.00
▷ Minimum class complexity6.00
▷ Maximum class complexity16.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
6 PNG files occupy 0.26MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/upi.png78.57KB29.46KB▼ 62.51%
admin/assets/img/paytm.png44.70KB21.35KB▼ 52.23%
admin/assets/img/sbi.png19.66KB9.76KB▼ 50.34%
admin/assets/img/qr.png14.84KB7.15KB▼ 51.81%
admin/assets/img/paypral.png24.14KB23.87KB▼ 1.11%