10% clmte-ecommerce-integration

Code Review | CLMTE - Ecommerce Integration

WordPress plugin CLMTE - Ecommerce Integration scored10%from 54 tests.

About plugin

  • Plugin page: clmte-ecommerce-i...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8
  • WordPress version: 6.3.1
  • First release: Jun 8, 2021
  • Latest release: Jul 26, 2021
  • Number of updates: 13
  • Update frequency: every 3.8 days
  • Top authors: aliceclmte (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /375 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-admin/includes/image.php+856
    exif_read_data(compensation-Image.jpg): Incorrect APP1 Exif Identifier Code

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.06ms] Passed 4 tests

An overview of server-side resources used by CLMTE - Ecommerce Integration
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.0543.39 ▼2.51
Dashboard /wp-admin3.68 ▲0.1251.56 ▼0.19
Posts /wp-admin/edit.php3.73 ▲0.0553.04 ▲0.08
Add New Post /wp-admin/post-new.php6.20 ▲0.0596.65 ▼10.11
Media Library /wp-admin/upload.php3.54 ▲0.0538.55 ▼3.42

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 30 new files
Database: 2 new tables, 9 new options
New tables
wp_clmte_log
wp_clmte_offsets_purchased
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
clmte_img_id
db_upgraded
clmte_compensation_product_id
widget_recent-comments
can_compress_scripts
widget_recent-posts
clmte_offset_price

Browser metrics Passed 4 tests

An overview of browser requirements for CLMTE - Ecommerce Integration
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲3114.44 ▼0.151.96 ▼0.1542.44 ▼2.37
Dashboard /wp-admin2,195 ▲185.54 ▼0.1582.01 ▼12.1541.13 ▼4.96
Posts /wp-admin/edit.php2,106 ▲92.04 ▲0.0241.26 ▲2.8837.61 ▼4.40
Add New Post /wp-admin/post-new.php1,529 ▼1617.46 ▼5.55658.37 ▲18.6555.27 ▼1.88
Media Library /wp-admin/upload.php1,443 ▲464.34 ▲0.13103.35 ▲2.6342.82 ▼3.41

Uninstaller [IO: ▲0.04MB] [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
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • clmte_offset_price

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/clmte-ecommerce-integration/public/partials/clmte-public-display.php
    • > /wp-content/plugins/clmte-ecommerce-integration/admin/partials/clmte-admin-display.php
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/clmte-ecommerce-integration/admin/partials/clmte-settings-main.php:5
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/clmte-ecommerce-integration/admin/partials/clmte-settings-log.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/clmte-ecommerce-integration/admin/partials/clmte-settings-log.php:17
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/clmte-ecommerce-integration/admin/partials/clmte-settings-purchases.php:18
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/clmte-ecommerce-integration/admin/partials/clmte-settings-purchases.php on line 17

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

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
3 plugin tags: shop, ecommerce, climate

clmte-ecommerce-integration/clmte.php 85% from 13 tests

"CLMTE - Ecommerce Integration" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("clmte-ecommerce-integration.php" instead of "clmte.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 plugin1,027 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP16322818821
CSS23015141
JavaScript2132365

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity4.75
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.81
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods37
▷ Static methods25.41%
▷ Public methods3286.49%
▷ Protected methods00.00%
▷ Private methods513.51%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/assets/website-logo.png5.63KB2.29KB▼ 59.27%
public/assets/info.png1.31KB0.84KB▼ 35.84%
public/assets/logo-white.png2.05KB1.00KB▼ 51.19%