74% ced-good-market-integration

Code Review | CedCommerce Integration for Good Market

WordPress plugin CedCommerce Integration for Good Market scored74%from 54 tests.

About plugin

  • Plugin page: ced-good-market-i...
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 13, 2022
  • Latest release: Apr 15, 2023
  • Number of updates: 9
  • Update frequency: every 13.7 days
  • Top authors: cedcommerce (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /467 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by CedCommerce Integration for Good Market
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.46 ▼4.11
Dashboard /wp-admin3.31 ▲0.0048.71 ▼4.07
Posts /wp-admin/edit.php3.36 ▲0.0045.11 ▼6.71
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.55 ▼17.32
Media Library /wp-admin/upload.php3.23 ▲0.0038.23 ▲2.95

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

Browser metrics Passed 4 tests

An overview of browser requirements for CedCommerce Integration for Good Market
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.30 ▼0.311.93 ▲0.0743.79 ▼0.25
Dashboard /wp-admin2,198 ▲215.64 ▼0.0485.07 ▼9.9340.21 ▼2.07
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0136.49 ▼0.5835.23 ▼1.15
Add New Post /wp-admin/post-new.php1,537 ▲323.34 ▲0.26702.58 ▲81.5074.87 ▲26.04
Media Library /wp-admin/upload.php1,397 ▼04.20 ▼0.04112.82 ▲7.1648.07 ▲6.04

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_good_market_upload_status
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_get_product() in wp-content/plugins/ced-good-market-integration/admin/partials/ced-good_market-metakeys-list.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ced-good-market-integration/admin/pages/ced-good_market-metakeys-template.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
4 plugin tags: good market integration, good market, good market integration for woocommerce, cedcommerce integration for good market

ced-good-market-integration/ced_good_market_integration.php 85% from 13 tests

The main PHP script in "CedCommerce Integration for Good Market" version 1.0.6 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ced-good-market-integration.php" instead of "ced_good_market_integration.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 156 characters long)

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
Success! There were no dangerous files found in this plugin7,047 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP327801,5074,924
CSS2108171,538
JavaScript24524511
JSON22074

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity42.00
▷ Minimum class complexity1.00
▷ Maximum class complexity176.00
Average method complexity5.26
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods154
▷ Static methods106.49%
▷ Public methods14694.81%
▷ Protected methods10.65%
▷ Private methods74.55%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/error.png4.25KB2.57KB▼ 39.66%
admin/images/filter.png11.82KB7.37KB▼ 37.62%