84% pods-ajax-views

Code Review | Pods AJAX Views

WordPress plugin Pods AJAX Views scored84%from 54 tests.

About plugin

  • Plugin page: pods-ajax-views
  • Plugin version: 1.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.4
  • WordPress version: 6.3.1
  • First release: Jun 20, 2014
  • Latest release: Mar 27, 2020
  • Number of updates: 8
  • Update frequency: every 263.9 days
  • Top authors: sc0ttkclark (87.5%)Shelob9 (25%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /4,192 total downloads

Benchmarks

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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.77ms] Passed 4 tests

Server-side resources used by Pods AJAX Views
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.66 ▼7.93
Dashboard /wp-admin3.32 ▲0.0249.09 ▼8.86
Posts /wp-admin/edit.php3.37 ▲0.0248.92 ▼4.07
Add New Post /wp-admin/post-new.php5.92 ▲0.0496.78 ▲1.78
Media Library /wp-admin/upload.php3.24 ▲0.0238.19 ▲2.64

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
pods_ajax_views_version
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Pods AJAX Views
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.71 ▲0.121.85 ▼0.2543.80 ▼0.85
Dashboard /wp-admin2,195 ▲155.56 ▼0.1184.69 ▼11.0739.59 ▼4.19
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0036.67 ▲1.2134.42 ▲0.09
Add New Post /wp-admin/post-new.php1,550 ▲123.10 ▼0.30657.06 ▼29.7449.91 ▼8.56
Media Library /wp-admin/upload.php1,400 ▲34.25 ▲0.0299.79 ▼2.3542.66 ▼4.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • pods_ajax_views_version
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pods-ajax-views/pods-ajax-views.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/pods-ajax-views/ui/view-stats.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: pods, ajax

pods-ajax-views/pods-ajax-views.php Passed 13 tests

The main file in "Pods AJAX Views" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
80 characters long description:
An easy way to generate cached views from AJAX when they haven't been cached yet

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin1,371 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP53624651,250
JavaScript14547121

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity72.33
▷ Minimum class complexity17.00
▷ Maximum class complexity133.00
Average method complexity7.48
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods33
▷ Static methods33100.00%
▷ Public methods2884.85%
▷ Protected methods00.00%
▷ Private methods515.15%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There are no PNG files in this plugin