83% advanced-query-loop

Code Review | Advanced Query Loop

WordPress plugin Advanced Query Loop scored83%from 54 tests.

About plugin

  • Plugin page: advanced-query-loop
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.4
  • WordPress version: 6.3.1
  • First release: Dec 20, 2022
  • Latest release: Nov 16, 2023
  • Number of updates: 26
  • Update frequency: every 12.7 days
  • Top authors: welcher (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /3,808 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.14ms] Passed 4 tests

A check of server-side resources used by Advanced Query Loop
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.71 ▲2.92
Dashboard /wp-admin3.35 ▲0.0545.92 ▼3.54
Posts /wp-admin/edit.php3.41 ▲0.0546.31 ▲1.14
Add New Post /wp-admin/post-new.php5.94 ▲0.0580.31 ▼18.77
Media Library /wp-admin/upload.php3.28 ▲0.0533.50 ▲0.61

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Query Loop
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.34 ▼0.041.76 ▲0.0244.37 ▼4.59
Dashboard /wp-admin2,198 ▲215.63 ▲0.1291.58 ▼12.3140.35 ▼4.43
Posts /wp-admin/edit.php2,100 ▲31.95 ▼0.0740.53 ▼0.3536.89 ▲1.59
Add New Post /wp-admin/post-new.php1,528 ▲223.48 ▲0.66609.03 ▼39.4052.10 ▲0.30
Media Library /wp-admin/upload.php1,400 ▼34.15 ▼0.0799.63 ▼1.8141.18 ▼4.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function AdvancedQueryLoop\\plugin_dir_path() in wp-content/plugins/advanced-query-loop/index.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/advanced-query-loop/includes/query-loop.php:61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-query-loop/includes/enqueues.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% 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
2 plugin tags: query loop, custom queries

advanced-query-loop/index.php 77% from 13 tests

The principal PHP file in "Advanced Query Loop" v. 2.0.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("6.2" instead of "6.1")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("advanced-query-loop.php" instead of "index.php")
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

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
Good job! No executable or dangerous file extensions detected265 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP448101233
Markdown123031
JavaScript1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
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
Namespaces1
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions450.00%
▷ Anonymous functions450.00%
Constants2
▷ Global constants2100.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
No PNG files were detected