78% clc-products

Code Review | CLC Products

WordPress plugin CLC Products scored78%from 54 tests.

About plugin

  • Plugin page: clc-products
  • Plugin version: 1.2.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.4
  • WordPress version: 6.3.1
  • First release: Mar 25, 2020
  • Latest release: May 11, 2020
  • Number of updates: 21
  • Update frequency: every 2.2 days
  • Top authors: clcnl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /540 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.93ms] Passed 4 tests

An overview of server-side resources used by CLC Products
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0239.24 ▲2.90
Dashboard /wp-admin3.32 ▲0.0243.75 ▼3.43
Posts /wp-admin/edit.php3.37 ▲0.0146.26 ▲0.56
Add New Post /wp-admin/post-new.php5.91 ▲0.0382.47 ▼19.75
Media Library /wp-admin/upload.php3.24 ▲0.0135.78 ▲4.12
CLC Products /wp-admin/options-general.php?page=clc-products3.1829.33

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 76 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by CLC Products
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.22 ▼1.435.21 ▲3.6343.91 ▲3.80
Dashboard /wp-admin2,210 ▲195.79 ▲0.9099.63 ▼0.8839.67 ▼1.65
Posts /wp-admin/edit.php2,096 ▲72.02 ▲0.0340.78 ▲4.1032.35 ▲2.25
Add New Post /wp-admin/post-new.php6,185 ▲4,66626.23 ▲3.02912.79 ▲203.0266.19 ▲13.05
Media Library /wp-admin/upload.php1,389 ▲44.18 ▼0.0594.39 ▼43.2741.98 ▼15.77
CLC Products /wp-admin/options-general.php?page=clc-products9402.0323.8730.27

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=clc-products
    • > Notice in wp-content/plugins/clc-products/clc_product.php+484
    Trying to access array offset on value of type bool

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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/clc-products/clc_product.php:498

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: products, books

clc-products/clc_product.php 92% from 13 tests

Analyzing the main PHP file in "CLC Products" version 1.2.4
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("clc-products.php" instead of "clc_product.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin16,281 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
CSS9912614,525
JSON2004,011
SVG2002,687
Sass305923102,172
JavaScript83451581,216
HTML2632891,067
PHP16421442
Markdown1520161

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
glider/docs/images/octo.png34.58KB16.92KB▼ 51.07%
glider/docs/assets/css/images/overlay.png19.63KB3.18KB▼ 83.82%
glider/docs/favicon.png3.12KB2.16KB▼ 30.88%