78% ctt-expresso-para-woocommerce

Code Review | CTT Expresso para WooCommerce

WordPress plugin CTT Expresso para WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: ctt-expresso-para...
  • Plugin version: 3.2.12
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 6, 2020
  • Latest release: Jan 16, 2023
  • Number of updates: 79
  • Update frequency: every 13.6 days
  • Top authors: Limpinho (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /6,207 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.04MB] [CPU: ▼3.65ms] Passed 4 tests

Server-side resources used by CTT Expresso para WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.07 ▼4.56
Dashboard /wp-admin3.34 ▲0.0444.25 ▼1.25
Posts /wp-admin/edit.php3.39 ▲0.0449.37 ▲4.04
Add New Post /wp-admin/post-new.php5.95 ▲0.0696.08 ▼9.87
Media Library /wp-admin/upload.php3.27 ▲0.0433.62 ▲1.08
Log /wp-admin/admin.php?page=cepw_log3.2128.01

Server storage [IO: ▲0.46MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options
_CTTExpresso_URL
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for CTT Expresso para WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8013.43 ▼0.971.67 ▲0.0543.48 ▲0.38
Dashboard /wp-admin2,232 ▲444.95 ▼0.91109.97 ▲3.6341.89 ▲0.68
Posts /wp-admin/edit.php2,105 ▲162.25 ▲0.2743.30 ▲3.5036.46 ▲2.04
Add New Post /wp-admin/post-new.php1,530 ▼1223.78 ▲5.58636.96 ▲34.7564.34 ▲14.10
Media Library /wp-admin/upload.php1,404 ▲164.45 ▲0.2496.21 ▼2.2642.48 ▲0.40
Log /wp-admin/admin.php?page=cepw_log7621.8025.4021.70

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% 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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=cepw_log
    • > Warning in wp-content/plugins/ctt-expresso-para-woocommerce/ctt-expresso-para-woocommerce.php+2834
    file_get_contents(wp-content/uploads/cepw/cepw_log.txt): failed to open stream: No such file or directory

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ctt-expresso-para-woocommerce/ctt-expresso-recolhas.php:93

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: woocommerce, thisfunctional, ctt, ctt expresso

ctt-expresso-para-woocommerce/ctt-expresso-para-woocommerce.php 92% from 13 tests

The main PHP script in "CTT Expresso para WooCommerce" version 3.2.12 is automatically included on every request by WordPress
It is important to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("5.0" instead of "4.6.1")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected6,694 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP44841733,357
JavaScript53651282,783
CSS31016503
SVG20151

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.35
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%
Functions75
▷ Named functions75100.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.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/logo.png5.52KB4.37KB▼ 20.93%
assets/img/ctt_expresso.png9.87KB5.63KB▼ 42.93%
assets/img/menu_icon.png3.27KB1.36KB▼ 58.32%