84% exchange-addon-custom-loop

Code Review | iThemes Exchange - Custom Loop Add-on

WordPress plugin iThemes Exchange - Custom Loop Add-on scored84%from 54 tests.

About plugin

  • Plugin page: exchange-addon-cu...
  • Plugin version: 1.0.14
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Nov 20, 2014
  • Latest release: Apr 5, 2016
  • Number of updates: 23
  • Update frequency: every 21.8 days
  • Top authors: ronaldvw (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

20+ active /3,534 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by iThemes Exchange - Custom Loop Add-on
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.50 ▼4.71
Dashboard /wp-admin3.31 ▲0.0146.33 ▼2.31
Posts /wp-admin/edit.php3.36 ▲0.0147.82 ▼2.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0195.75 ▲5.00
Media Library /wp-admin/upload.php3.23 ▲0.0135.53 ▲0.42

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

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

Browser metrics Passed 4 tests

Checking browser requirements for iThemes Exchange - Custom Loop Add-on
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.47 ▲0.241.76 ▲0.0341.26 ▲1.61
Dashboard /wp-admin2,209 ▲185.87 ▲0.97108.70 ▲2.7439.76 ▼5.05
Posts /wp-admin/edit.php2,086 ▼32.05 ▲0.0639.51 ▼1.2236.08 ▼1.06
Add New Post /wp-admin/post-new.php1,533 ▼822.99 ▼0.32610.11 ▲20.8554.41 ▼3.00
Media Library /wp-admin/upload.php1,382 ▼34.23 ▲0.0796.66 ▼10.8943.92 ▼0.44

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/exchange-addon-custom-loop/init.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/exchange-addon-custom-loop/lib/metabox/page-meta-box.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/exchange-addon-custom-loop/lib/metabox/init.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/exchange-addon-custom-loop/exchange-addon-custom-loop.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
10 plugin tags: addon, exchange addon, store, add-on, loop...

exchange-addon-custom-loop/exchange-addon-custom-loop.php Passed 13 tests

The primary PHP file in "iThemes Exchange - Custom Loop Add-on" version 1.0.14 is used by WordPress to initiate all plugin functionality
88 characters long description:
iThemes Exchange custom loop offers more control over the loop that builts a store page.

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
There were no executable files found in this plugin5,483 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP97001,1262,360
JavaScript83363932,289
CSS67336611
PO File176149205
YAML15018

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity64.86
▷ Minimum class complexity20.00
▷ Maximum class complexity136.00
Average method complexity3.92
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods153
▷ Static methods3422.22%
▷ Public methods15198.69%
▷ Protected methods21.31%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
15 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/metabox/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
lib/metabox/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
lib/metabox/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
lib/metabox/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
lib/metabox/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%