89% cocart-rate-limiting

Code Review | CoCart - Rate Limiting

WordPress plugin CoCart - Rate Limiting scored 89% from 54 tests.

About plugin

  • Plugin page: cocart-rate-limiting
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2
  • WordPress version: 6.3.1
  • First release: Mar 4, 2023
  • Latest release: Mar 4, 2023
  • Number of updates: 5
  • Update frequency: every 11.4 days
  • Top authors: cocartforwc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 157 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.39ms] Passed 4 tests

Analyzing server-side resources used by CoCart - Rate Limiting
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.56 ▼5.21
Dashboard /wp-admin3.34 ▲0.0351.47 ▲2.01
Posts /wp-admin/edit.php3.39 ▲0.0346.30 ▼3.46
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.40 ▼12.30
Media Library /wp-admin/upload.php3.26 ▲0.0335.86 ▼0.57

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
cocart_addons_installed
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for CoCart - Rate Limiting
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.29 ▼1.104.95 ▲2.9442.00 ▼1.42
Dashboard /wp-admin2,209 ▲184.87 ▼0.07101.75 ▼1.8138.55 ▼1.96
Posts /wp-admin/edit.php2,089 ▲31.99 ▼0.0137.19 ▲0.5232.93 ▲1.33
Add New Post /wp-admin/post-new.php1,533 ▲1223.39 ▲0.23599.43 ▼32.4954.79 ▼13.33
Media Library /wp-admin/upload.php1,388 ▲64.28 ▲0.0897.22 ▼7.2341.48 ▼3.93

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • cocart_addons_installed
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: woocommerce, rest-api, rate-limit, headless, decoupled

cocart-rate-limiting/cocart-rate-limiting.php 85% from 13 tests

The main file in "CoCart - Rate Limiting" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Domain Path: The domain path folder was not found ("/languages/")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin105 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP336131105

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods8
▷ Static methods8100.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin