83% c4d-shoppable-images

Code Review | C4D Shoppable Images

WordPress plugin C4D Shoppable Images scored83%from 54 tests.

About plugin

  • Plugin page: c4d-shoppable-images
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Jun 2, 2020
  • Latest release: Jun 8, 2020
  • Number of updates: 8
  • Update frequency: every 1.3 days
  • Top authors: coffee4dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /699 total downloads

Benchmarks

Plugin footprint 83% from 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.01MB] [CPU: ▼8.63ms] Passed 4 tests

A check of server-side resources used by C4D Shoppable Images
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.47 ▼4.38
Dashboard /wp-admin3.31 ▼0.0344.94 ▼16.91
Posts /wp-admin/edit.php3.36 ▲0.0049.63 ▲2.51
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.72 ▼15.74
Media Library /wp-admin/upload.php3.23 ▲0.0039.56 ▲6.29

Server storage [IO: ▲8.17MB] [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: 35 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for C4D Shoppable Images
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.18 ▼1.254.39 ▲2.5840.25 ▼4.30
Dashboard /wp-admin2,203 ▲155.95 ▲1.0797.72 ▼26.0937.44 ▼10.66
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0139.70 ▲1.3833.41 ▼12.37
Add New Post /wp-admin/post-new.php1,514 ▼1417.95 ▼0.38678.08 ▲41.2156.79 ▲2.20
Media Library /wp-admin/upload.php1,385 ▼34.26 ▲0.0597.04 ▼6.4843.93 ▼3.78

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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 fix the following items
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/c4d-shoppable-images/includes/language.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/c4d-shoppable-images/includes/product-search.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/c4d-shoppable-images/includes/post-type.php:54
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/c4d-shoppable-images/includes/shortcode.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/c4d-shoppable-images/includes/defined.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/c4d-shoppable-images/includes/load-script.php:3

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Screenshots: These screenshots need descriptions #1, #2, #3 in c4d-shoppable-images/assets to your readme.txt
The official readme.txt might help

c4d-shoppable-images/c4d-shoppable-images.php 92% from 13 tests

The main file in "C4D Shoppable Images" v. 1.0.3 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: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin3,196 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript6848662,139
PHP77276344
CSS4445276
Sass2275262
LESS1115152
SVG11013
Ruby1208
HTML2002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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 images were found in this plugin