79% tori-ajax

Code Review | Tori Ajax

WordPress plugin Tori Ajax scored79%from 54 tests.

About plugin

  • Plugin page: tori-ajax
  • Plugin version: 2.0.2
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 12, 2022
  • Latest release: Apr 22, 2023
  • Number of updates: 20
  • Update frequency: every 18.8 days
  • Top authors: alvinmuthui (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /827 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.57MB] [CPU: ▼0.99ms] Passed 4 tests

Server-side resources used by Tori Ajax
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5944.69 ▲1.06
Dashboard /wp-admin3.90 ▲0.5952.73 ▼1.13
Posts /wp-admin/edit.php3.95 ▲0.5950.03 ▼1.85
Add New Post /wp-admin/post-new.php6.41 ▲0.5395.44 ▼2.05
Media Library /wp-admin/upload.php3.82 ▲0.5944.25 ▲9.59
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius4.0242.85

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 200 new files
Database: no new tables, 10 new options
New WordPress options
fs_accounts
can_compress_scripts
fs_active_plugins
db_upgraded
widget_recent-posts
fs_gdpr
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
fs_debug_mode

Browser metrics Passed 4 tests

Tori Ajax: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.74 ▲0.181.71 ▼0.0332.01 ▼10.04
Dashboard /wp-admin2,223 ▲495.53 ▼0.0485.80 ▼10.2042.89 ▼3.32
Posts /wp-admin/edit.php2,132 ▲292.04 ▲0.0236.89 ▼2.5332.86 ▼1.53
Add New Post /wp-admin/post-new.php1,543 ▲323.72 ▲0.37688.13 ▲47.0252.98 ▲2.74
Media Library /wp-admin/upload.php1,434 ▲314.15 ▼0.13111.86 ▲3.5549.75 ▲1.24
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius1,0961.7131.1630.39

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/tori-ajax/freemius/includes/class-freemius.php+8772
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 10 options in the database
    • can_compress_scripts
    • db_upgraded
    • fs_accounts
    • widget_recent-posts
    • fs_active_plugins
    • fs_debug_mode
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • fs_gdpr

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: tori_ajax, toria_add_ajax, javascript, ajax, wordpress

tori-ajax/toria.php 85% from 13 tests

"Tori Ajax" version 2.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("tori-ajax.php" instead of "toria.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin33,926 lines of code in 147 files:
LanguageFilesBlank linesComment linesLines of code
PHP1288,11818,01633,478
Markdown1680214
JavaScript33459194
Sass11226
CSS140014

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,089)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity79.02
▷ Minimum class complexity1.00
▷ Maximum class complexity3,089.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes57
▷ Abstract classes23.51%
▷ Concrete classes5596.49%
▷ Final classes00.00%
Methods1,298
▷ Static methods19515.02%
▷ Public methods90869.95%
▷ Protected methods171.31%
▷ Private methods37328.74%
Functions98
▷ Named functions98100.00%
▷ Anonymous functions00.00%
Constants148
▷ Global constants10168.24%
▷ Class constants4731.76%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.17MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/toria-edit-Ajax.png64.38KB27.60KB▼ 57.13%
assets/screenshot-1.png16.67KB7.03KB▼ 57.85%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
assets/screenshot-2.png23.92KB9.06KB▼ 62.14%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%