94% shortcodehub-addon-image-color-palette

Code Review | ShortcodeHub Addon - Image Color Palette

WordPress plugin ShortcodeHub Addon - Image Color Palette scored 94% from 54 tests.

About plugin

  • Plugin page: shortcodehub-addo...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.2
  • WordPress version: 5.8.1
  • First release: Aug 11, 2019
  • Latest release: Aug 11, 2019
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: shortcodehub (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 401 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

An overview of server-side resources used by ShortcodeHub Addon - Image Color Palette
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1228.03 ▲7.88
Dashboard /wp-admin3.06 ▲0.0143.88 ▲0.05
Posts /wp-admin/edit.php3.11 ▲0.0143.76 ▲0.90
Add New Post /wp-admin/post-new.php5.43 ▼0.0095.41 ▼560.03
Media Library /wp-admin/upload.php3.01 ▼0.0029.54 ▼8.71

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for ShortcodeHub Addon - Image Color Palette
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.77 ▼0.127.86 ▼1.2945.40 ▼1.70
Dashboard /wp-admin2,967 ▲345.85 ▼0.06135.97 ▼4.93117.63 ▲8.22
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0164.90 ▲1.7284.90 ▲0.05
Add New Post /wp-admin/post-new.php1,672 ▼018.81 ▼0.14358.35 ▼22.17106.21 ▼3.32
Media Library /wp-admin/upload.php1,810 ▲35.03 ▲0.01159.72 ▲15.06111.23 ▼10.37

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
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 | This is a short smoke test looking 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shortcodehub-addon-image-color-palette/classes/class-sh-addon-icp-loader.php:46

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 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
5 plugin tags: color, image color, palette, image, color palette

shortcodehub-addon-image-color-palette/shortcodehub-addon-image-color palette.php 85% from 13 tests

This is the main PHP file of "ShortcodeHub Addon - Image Color Palette" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("shortcodehub-addon-image-color-palette.php" instead of "shortcodehub-addon-image-color palette.php")

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
There were no executable files found in this plugin354 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript45257177
PHP237108144
CSS17033

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin