83% ecommerce-banner-and-gallery

Code Review | Ecommerce Banner and Gallery

WordPress plugin Ecommerce Banner and Gallery scored83%from 54 tests.

About plugin

  • Plugin page: ecommerce-banner-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 22, 2023
  • Latest release: Mar 22, 2023
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: wpteamindianic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /110 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.61MB] [CPU: ▼12.59ms] Passed 4 tests

Analyzing server-side resources used by Ecommerce Banner and Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0845.83 ▲0.80
Dashboard /wp-admin3.38 ▲0.0755.77 ▲3.66
Posts /wp-admin/edit.php3.49 ▲0.1351.68 ▲2.43
Add New Post /wp-admin/post-new.php3.22 ▼2.6638.12 ▼54.72
Media Library /wp-admin/upload.php3.30 ▲0.0735.96 ▲1.13

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ecommerce Banner and Gallery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,907 ▲14613.48 ▼0.899.62 ▲7.6443.06 ▼4.41
Dashboard /wp-admin2,193 ▲165.61 ▼0.0193.98 ▲3.7042.63 ▲1.97
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0641.00 ▲6.7936.28 ▼0.16
Add New Post /wp-admin/post-new.php1,530 ▲423.00 ▲0.05668.46 ▼26.5458.38 ▲0.88
Media Library /wp-admin/upload.php1,398 ▼24.20 ▲0.1193.34 ▼13.7844.82 ▼0.71

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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 fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ecommerce-banner-and-gallery/public/partials/wc-banner-gallery-public-display.php
    • > /wp-content/plugins/ecommerce-banner-and-gallery/admin/partials/wc-banner-gallery-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed: The official readme.txt is a good inspiration

ecommerce-banner-and-gallery/wc-banner-gallery.php 85% from 13 tests

The main file in "Ecommerce Banner and Gallery" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ecommerce-banner-and-gallery.php" instead of "wc-banner-gallery.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin493 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP12136537288
CSS4149122
JavaScript3245165
Markdown18018

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity3.86
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected