83% colormeshop

Code Review | ColorMeShop WordPress Plugin

WordPress plugin ColorMeShop WordPress Plugin scored83%from 54 tests.

About plugin

  • Plugin page: colormeshop
  • Plugin version: 2.0.2
  • PHP compatiblity: 7.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8.1
  • WordPress version: 6.3.1
  • First release: Jun 20, 2018
  • Latest release: Oct 13, 2021
  • Number of updates: 17
  • Update frequency: every 71.2 days
  • Top authors: colormeshop (100%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active /6,819 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.51ms] Passed 4 tests

A check of server-side resources used by ColorMeShop WordPress Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0341.63 ▲1.71
Dashboard /wp-admin3.42 ▲0.0851.79 ▼14.72
Posts /wp-admin/edit.php3.48 ▲0.1249.54 ▼3.86
Add New Post /wp-admin/post-new.php5.94 ▲0.0586.92 ▼12.88
Media Library /wp-admin/upload.php3.28 ▲0.0537.11 ▲1.42

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 457 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for ColorMeShop WordPress Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5914.19 ▼0.161.68 ▼0.6546.47 ▲0.49
Dashboard /wp-admin2,208 ▲375.55 ▲0.0490.00 ▼1.6244.20 ▲6.22
Posts /wp-admin/edit.php2,116 ▲162.03 ▲0.0535.05 ▼1.0438.32 ▲1.80
Add New Post /wp-admin/post-new.php1,549 ▲1422.99 ▲4.88663.13 ▲25.5850.79 ▼24.47
Media Library /wp-admin/upload.php1,416 ▲194.13 ▼0.07101.90 ▼25.8748.41 ▼1.32

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 258× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/colormeshop/vendor/guzzlehttp/promises/src/CancellationException.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\Flysystem\\FilesystemException' not found in wp-content/plugins/colormeshop/vendor/league/flysystem/src/NotSupportedException.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'ColorMeShop\\Swagger\\Model\\ModelInterface' not found in wp-content/plugins/colormeshop/src/Swagger/Model/V1productsProduct.php:42
    • > PHP Fatal error
      Uncaught Error: Interface 'ColorMeShop\\Shortcode_Interface' not found in wp-content/plugins/colormeshop/src/shortcodes/product/class-option.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'ColorMeShop\\Swagger\\Model\\ModelInterface' not found in wp-content/plugins/colormeshop/src/Swagger/Model/InlineResponse20011Groups.php:42
    • > PHP Fatal error
      Uncaught Error: Interface 'ColorMeShop\\Swagger\\Model\\ModelInterface' not found in wp-content/plugins/colormeshop/src/Swagger/Model/V1ProductsBody.php:42
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/colormeshop/vendor/pepabo/oauth2-colormeshop/test/src/Provider/ColorMeShopTest.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'ColorMeShop\\Swagger\\Model\\ModelInterface' not found in wp-content/plugins/colormeshop/src/Swagger/Model/ScriptTag1.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'ColorMeShop\\Swagger\\Model\\ModelInterface' not found in wp-content/plugins/colormeshop/src/Swagger/Model/ProductVariant.php:42
    • > PHP Fatal error
      Uncaught Error: Class 'League\\Flysystem\\Plugin\\AbstractPlugin' not found in wp-content/plugins/colormeshop/vendor/league/flysystem/src/Plugin/ListPaths.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: ec, colormeshop, ecommerce

colormeshop/colormeshop-wp-plugin.php 85% from 13 tests

This is the main PHP file of "ColorMeShop WordPress Plugin" version 2.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("colormeshop.php" instead of "colormeshop-wp-plugin.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 350 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin59,918 lines of code in 427 files:
LanguageFilesBlank linesComment linesLines of code
PHP38711,99046,35655,464
Markdown1175502,652
JSON18101,578
reStructuredText19613997
XML32053
YAML414053
make27018
Bourne Shell1203

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.32
Average class complexity13.94
▷ Minimum class complexity1.00
▷ Maximum class complexity222.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces44
Interfaces31
Traits16
Classes310
▷ Abstract classes72.26%
▷ Concrete classes30397.74%
▷ Final classes165.28%
Methods5,574
▷ Static methods86515.52%
▷ Public methods5,24294.04%
▷ Protected methods1673.00%
▷ Private methods1652.96%
Functions403
▷ Named functions10927.05%
▷ Anonymous functions29472.95%
Constants486
▷ Global constants449.05%
▷ Class constants44290.95%
▷ Public constants442100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 1.87MB with 1.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshots/create_page.png311.63KB87.02KB▼ 72.08%
screenshots/page_id.png193.16KB55.80KB▼ 71.11%
screenshots/shop_page.png534.55KB155.43KB▼ 70.92%
screenshots/sitemap.png164.90KB51.22KB▼ 68.94%
screenshots/application_credentials.png218.77KB68.51KB▼ 68.68%