68% cp-image-store

Code Review | CP Image Store with Slideshow

WordPress plugin CP Image Store with Slideshow scored68%from 54 tests.

About plugin

  • Plugin page: cp-image-store
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 12, 2013
  • Latest release: Sep 4, 2023
  • Number of updates: 168
  • Update frequency: every 22.1 days
  • Top authors: codepeople (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

30+ active /34,367 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.14MB] [CPU: ▲5.81ms] Passed 4 tests

Server-side resources used by CP Image Store with Slideshow
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1447.32 ▲2.54
Dashboard /wp-admin3.43 ▲0.1356.87 ▲6.52
Posts /wp-admin/edit.php3.55 ▲0.1958.55 ▲13.36
Add New Post /wp-admin/post-new.php6.04 ▲0.1594.67 ▲2.19
Media Library /wp-admin/upload.php3.36 ▲0.1347.71 ▲12.00
Categories /wp-admin/edit-tags.php?taxonomy=cpis_category3.3542.86
Authors /wp-admin/edit-tags.php?taxonomy=cpis_author3.3542.95
Importing Area /wp-admin/admin.php?page=image-store-menu-import3.3238.88
Images for Sale /wp-admin/edit.php?post_type=cpis_image3.4044.74
Store Settings /wp-admin/admin.php?page=image-store-menu-settings3.3942.57
Color Schemes /wp-admin/edit-tags.php?taxonomy=cpis_color3.3644.82
Types /wp-admin/edit-tags.php?taxonomy=cpis_type3.3643.81
Sales Report /wp-admin/admin.php?page=image-store-menu-reports3.3341.46
Image Store /wp-admin/options-general.php?page=image-store-menu-settings-page3.3442.16

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 48 new files
Database: 4 new tables, 10 new options
New tables
wp_cpis_file
wp_cpis_purchase
wp_cpis_image_file
wp_cpis_image
New WordPress options
cpis_options
theysaidso_admin_options
installed_cp-image-store
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
cpis_has_been_configured
widget_cpisproductwidget

Browser metrics Passed 4 tests

An overview of browser requirements for CP Image Store with Slideshow
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,972 ▲21113.89 ▼0.8810.05 ▲8.3636.62 ▼10.69
Dashboard /wp-admin2,238 ▲585.56 ▼0.1298.20 ▼0.4992.41 ▲45.30
Posts /wp-admin/edit.php2,183 ▲832.30 ▲0.3035.31 ▼1.0934.43 ▼4.04
Add New Post /wp-admin/post-new.php6,427 ▲4,89027.88 ▲9.781,024.85 ▲369.4239.01 ▼26.63
Media Library /wp-admin/upload.php1,458 ▲614.26 ▲0.07104.86 ▲2.0364.49 ▲18.24
Categories /wp-admin/edit-tags.php?taxonomy=cpis_category1,3322.1227.3632.11
Authors /wp-admin/edit-tags.php?taxonomy=cpis_author1,3012.2525.8029.76
Importing Area /wp-admin/admin.php?page=image-store-menu-import1,0541.9923.3434.59
Images for Sale /wp-admin/edit.php?post_type=cpis_image1,1871.9431.8330.29
Store Settings /wp-admin/admin.php?page=image-store-menu-settings9731.8126.1633.61
Color Schemes /wp-admin/edit-tags.php?taxonomy=cpis_color1,4552.1227.9534.27
Types /wp-admin/edit-tags.php?taxonomy=cpis_type1,5082.2529.5633.16
Sales Report /wp-admin/admin.php?page=image-store-menu-reports1,3882.0423.7725.82
Image Store /wp-admin/options-general.php?page=image-store-menu-settings-page1,9831.8226.5459.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 4 tables in the database
    • wp_cpis_image
    • wp_cpis_image_file
    • wp_cpis_purchase
    • wp_cpis_file
  • Zombie WordPress options detected upon uninstall: 10 options
    • db_upgraded
    • theysaidso_admin_options
    • cpis_has_been_configured
    • widget_theysaidso_widget
    • widget_cpisproductwidget
    • installed_cp-image-store
    • cpis_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/cp-image-store/includes/ipn.php
  • 10× 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/cp-image-store/banner.php:107
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cp-image-store/banner.php:107
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cp-image-store/includes/submit.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/cp-image-store/addons/affiliateroyale.addon.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cp-image-store/includes/download.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'SiteOrigin_Widget' not found in wp-content/plugins/cp-image-store/pagebuilders/siteorigin/siteorigin-cpis-product/siteorigin-cpis-product.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cp-image-store/includes/wizard.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/cp-image-store/pagebuilders/siteorigin/siteorigin-cpis/tpl/siteorigin-cpis-shortcode.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'SiteOrigin_Widget' not found in wp-content/plugins/cp-image-store/pagebuilders/siteorigin/siteorigin-cpis/siteorigin-cpis.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cp-image-store/includes/image.php:140

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: There are too many tags (42 tag instead of maximum 10)
The official readme.txt is a good inspiration

cp-image-store/cp-image-store.php 92% from 13 tests

"CP Image Store with Slideshow" version 1.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 240 characters long)

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
Everything looks great! No dangerous files found in this plugin6,425 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP176831894,810
PO File1288295637
JavaScript66827634
HTML100178
CSS5258158
INI1006
SVG2002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity1.82
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods49
▷ Static methods48.16%
▷ Public methods3979.59%
▷ Protected methods48.16%
▷ Private methods612.24%
Functions77
▷ Named functions7192.21%
▷ Anonymous functions67.79%
Constants18
▷ Global constants18100.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
10 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
layouts/01/search_icon.png0.39KB0.30KB▼ 22.44%
css/arrow_right.png0.67KB0.73KB0.00%
images/image-store-insert-product.png0.22KB0.10KB▼ 55.56%
layouts/01/active_btn_bg.png0.22KB0.21KB▼ 4.82%
css/arrow_left.png0.58KB0.62KB0.00%