84% auto-refresh-api-ajax

Code Review | Auto Refresh API AJAX

WordPress plugin Auto Refresh API AJAX scored84%from 54 tests.

About plugin

  • Plugin page: auto-refresh-api-...
  • Plugin version: 1.2.8
  • PHP compatiblity: 5.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 2, 2019
  • Latest release: Aug 10, 2023
  • Number of updates: 99
  • Update frequency: every 16.4 days
  • Top authors: berkux (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /3,928 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by Auto Refresh API AJAX
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.19 ▼6.56
Dashboard /wp-admin3.32 ▲0.0147.90 ▼1.31
Posts /wp-admin/edit.php3.37 ▲0.0152.99 ▲0.29
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.97 ▼20.40
Media Library /wp-admin/upload.php3.24 ▲0.0139.89 ▲2.74

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Auto Refresh API AJAX
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲1814.17 ▼0.411.84 ▼0.3945.16 ▲2.67
Dashboard /wp-admin2,210 ▲335.56 ▼0.0994.72 ▲4.2883.18 ▲39.28
Posts /wp-admin/edit.php2,118 ▲182.00 ▼0.1038.19 ▲0.8133.56 ▼6.76
Add New Post /wp-admin/post-new.php1,539 ▲423.65 ▲5.52654.38 ▼17.09144.91 ▲83.57
Media Library /wp-admin/upload.php1,409 ▲124.27 ▲0.03110.11 ▲5.1780.27 ▲35.41

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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 fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/auto-refresh-api-ajax/auto-refresh-api-ajax.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side


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
7 plugin tags: liveticker, json, api, ajax, liveupdate...

auto-refresh-api-ajax/auto-refresh-api-ajax.php Passed 13 tests

The entry point to "Auto Refresh API AJAX" version 1.2.8 is a PHP file that has certain tags in its header comment area
49 characters long description:
Load JSON-data via Ajax, display it and reload it

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin631 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1785.00%
▷ Anonymous functions315.00%
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/araa-loadcircle-16x16.png0.45KB0.39KB▼ 12.83%
images/screenshot-1.png65.07KB36.27KB▼ 44.26%
images/araa-loadcircle-256x256.png4.80KB3.77KB▼ 21.45%