84% aspl-product-badges

Code Review | ASPL Product Badges

WordPress plugin ASPL Product Badges scored84%from 54 tests.

About plugin

  • Plugin page: aspl-product-badges
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.4.1
  • WordPress version: 6.3.1
  • First release: May 20, 2020
  • Latest release: May 20, 2020
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: acespritech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /518 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 gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.48ms] Passed 4 tests

Analyzing server-side resources used by ASPL Product Badges
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.86 ▲0.41
Dashboard /wp-admin3.31 ▲0.0048.79 ▼2.90
Posts /wp-admin/edit.php3.36 ▲0.0050.53 ▼3.20
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.45 ▼8.23
Media Library /wp-admin/upload.php3.23 ▲0.0039.32 ▲3.28

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

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

Browser metrics Passed 4 tests

Checking browser requirements for ASPL Product Badges
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.74 ▲0.342.04 ▲0.2145.55 ▲1.05
Dashboard /wp-admin2,203 ▲125.81 ▼0.0897.97 ▼12.1440.96 ▲1.00
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0235.79 ▼6.0132.81 ▼4.91
Add New Post /wp-admin/post-new.php1,519 ▼1423.18 ▼0.01617.20 ▼75.2256.90 ▼3.77
Media Library /wp-admin/upload.php1,388 ▼04.16 ▼0.0499.22 ▼8.7643.01 ▼4.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • 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
Everything seems fine, however 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
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/aspl-product-badges/index.php:17
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/aspl-product-badges/index.php on line 15
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/aspl-product-badges/index.php on line 15
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/aspl-product-badges/index.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: new, aspl, soldout, product badges

aspl-product-badges/index.php 85% from 13 tests

The main file in "ASPL Product Badges" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("aspl-product-badges.php" instead of "index.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected234 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15735194
JavaScript115040

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
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
Namespaces0
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%
Functions9
▷ Named functions9100.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
PNG images were not found in this plugin