94% shopp-featured-images

Code Review | Shopp Featured Images

WordPress plugin Shopp Featured Images scored 94% from 54 tests.

About plugin

  • Plugin page: shopp-featured-im...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.2-4.7.3
  • WordPress version: 5.9.2
  • First release: Apr 14, 2017
  • Latest release: Apr 15, 2017
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: Shoppdeveloper.com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 439 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

An overview of server-side resources used by Shopp Featured Images
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0356.72 ▲8.37
Dashboard /wp-admin3.43 ▲0.0237.06 ▲2.06
Posts /wp-admin/edit.php3.66 ▲0.0242.75 ▼36.98
Add New Post /wp-admin/post-new.php6.90 ▼0.0795.60 ▼1,175.13
Media Library /wp-admin/upload.php3.31 ▲0.0233.24 ▲0.60

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Shopp Featured Images
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,771 ▲1315.61 ▼0.107.04 ▲0.402.56 ▲0.08
Dashboard /wp-admin2,881 ▲306.09 ▼0.09115.67 ▼24.20156.55 ▼5.03
Posts /wp-admin/edit.php2,691 ▼33.24 ▲0.0061.97 ▼6.44136.45 ▼13.47
Add New Post /wp-admin/post-new.php1,698 ▼6221.78 ▼0.09433.59 ▼20.28156.82 ▼2.22
Media Library /wp-admin/upload.php1,698 ▼05.46 ▼0.03153.09 ▲6.62184.25 ▼10.47

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shopp-featured-images/sfi.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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: ecommerce, post thumbs, featured images, webshop, shopp

shopp-featured-images/sfi.php 85% from 13 tests

The main PHP file in "Shopp Featured Images" ver. 1.1.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 279 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("shopp-featured-images.php" instead of "sfi.php")

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 plugin90 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1303690

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods222.22%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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