84% exchange-addon-gis-layout

Code Review | iThemes Exchange - GIS Layout Add-on

WordPress plugin iThemes Exchange - GIS Layout Add-on scored 84% from 54 tests.

About plugin

  • Plugin page: exchange-addon-gi...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.5.2
  • WordPress version: 6.3.1
  • First release: Jun 30, 2016
  • Latest release: Jun 27, 2016
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: ronaldvw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 841 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by iThemes Exchange - GIS Layout Add-on
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.99 ▼4.52
Dashboard /wp-admin3.31 ▲0.0147.01 ▼1.60
Posts /wp-admin/edit.php3.36 ▲0.0146.68 ▲2.84
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.94 ▼5.19
Media Library /wp-admin/upload.php3.23 ▲0.0135.60 ▲1.86

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by iThemes Exchange - GIS Layout Add-on
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.32 ▼1.051.72 ▼0.0842.85 ▼0.92
Dashboard /wp-admin2,200 ▲125.80 ▼0.0797.67 ▼19.5540.19 ▼8.57
Posts /wp-admin/edit.php2,092 ▲32.01 ▲0.0139.51 ▲3.8536.50 ▲1.17
Add New Post /wp-admin/post-new.php1,542 ▲2818.34 ▲0.74619.35 ▼24.9554.88 ▲14.47
Media Library /wp-admin/upload.php1,382 ▼64.20 ▼0.0496.07 ▼5.7041.36 ▼6.13

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/exchange-addon-gis-layout/init.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function it_exchange() in wp-content/plugins/exchange-addon-gis-layout/lib/templates/content-store/elements/description.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/exchange-addon-gis-layout/lib/templates/content-store/loops/product-info.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function it_exchange_product_has_feature() in wp-content/plugins/exchange-addon-gis-layout/lib/templates/content-store/elements/product.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/exchange-addon-gis-layout/exchange-addon-gis-layout.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/exchange-addon-gis-layout/lib/addon-settings.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/exchange-addon-gis-layout/lib/required-hooks.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: store, exchange add-on, layout, add-on, ithemes exchange...

exchange-addon-gis-layout/exchange-addon-gis-layout.php Passed 13 tests

"iThemes Exchange - GIS Layout Add-on" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
118 characters long description:
This add-on for iThemes Exchange creates a "Google Image Search (GIS)" inspired layout for products on the store page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin555 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP8127176401
CSS1242136
JavaScript17018

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of 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.19
Average class complexity17.00
▷ Minimum class complexity16.00
▷ Maximum class complexity18.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
lib/assets/gis-layout50px.png3.94KB0.59KB▼ 85.03%