79% portugal-ctt-tracking-woocommerce

Code Review | Portugal CTT Tracking for WooCommerce

WordPress plugin Portugal CTT Tracking for WooCommerce scored79%from 54 tests.

About plugin

  • Plugin page: portugal-ctt-trac...
  • Plugin version: 2.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 26, 2019
  • Latest release: Jul 8, 2023
  • Number of updates: 39
  • Update frequency: every 37.0 days
  • Top authors: webdados (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

700+ active /8,303 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.09ms] Passed 4 tests

A check of server-side resources used by Portugal CTT Tracking for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.42 ▼0.26
Dashboard /wp-admin3.31 ▲0.0145.25 ▼5.18
Posts /wp-admin/edit.php3.36 ▲0.0148.02 ▲4.35
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.54 ▼19.03
Media Library /wp-admin/upload.php3.23 ▲0.0134.79 ▲0.10

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 136 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Portugal CTT Tracking for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,943 ▲20813.24 ▼1.441.60 ▼0.2244.20 ▼5.72
Dashboard /wp-admin2,352 ▲1645.16 ▼0.7498.49 ▼15.3086.75 ▲38.39
Posts /wp-admin/edit.php2,232 ▲1432.07 ▲0.0834.49 ▼1.6833.31 ▼4.49
Add New Post /wp-admin/post-new.php1,643 ▲12917.44 ▼0.19731.43 ▲125.3263.42 ▲9.53
Media Library /wp-admin/upload.php1,534 ▲1494.23 ▲0.1294.38 ▼1.3376.42 ▲35.90

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

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
  • 8× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/portugal-ctt-tracking-woocommerce/includes/simplehtmldom_1_9/example/scraping/example_scraping_general.php
    • > /wp-content/plugins/portugal-ctt-tracking-woocommerce/includes/simplehtmldom_1_9/example/example_extract_html.php
    • > /wp-content/plugins/portugal-ctt-tracking-woocommerce/includes/simplehtmldom_1_9/example/example_advanced_selector.php
    • > /wp-content/plugins/portugal-ctt-tracking-woocommerce/includes/simplehtmldom_1_9/example/example_basic_selector.php
    • > /wp-content/plugins/portugal-ctt-tracking-woocommerce/includes/simplehtmldom_1_9/example/example_callback.php
    • > /wp-content/plugins/portugal-ctt-tracking-woocommerce/includes/simplehtmldom_1_9/example/scraping/example_scraping_imdb.php
    • > /wp-content/plugins/portugal-ctt-tracking-woocommerce/includes/simplehtmldom_1_9/example/scraping/example_scraping_slashdot.php
    • > /wp-content/plugins/portugal-ctt-tracking-woocommerce/includes/simplehtmldom_1_9/example/example_modify_contents.php
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Trying to get property 'innertext' of non-object in wp-content/plugins/portugal-ctt-tracking-woocommerce/includes/simplehtmldom_1_9/example/scraping/example_scraping_imdb.php on line 12
    • > PHP Warning
      include_once(): Failed opening 'simple_html_dom.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/portugal-ctt-tracking-woocommerce/includes/simplehtmldom_1_9/example/scraping/example_scraping_general.php on line 2
    • > PHP Notice
      Trying to get property 'plaintext' of non-object in wp-content/plugins/portugal-ctt-tracking-woocommerce/includes/simplehtmldom_1_9/example/scraping/example_scraping_slashdot.php on line 13
    • > PHP Notice
      Trying to get property 'plaintext' of non-object in wp-content/plugins/portugal-ctt-tracking-woocommerce/includes/simplehtmldom_1_9/example/example_basic_selector.php on line 33
    • > PHP Notice
      Trying to get property 'plaintext' of non-object in wp-content/plugins/portugal-ctt-tracking-woocommerce/includes/simplehtmldom_1_9/example/scraping/example_scraping_slashdot.php on line 11
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/portugal-ctt-tracking-woocommerce/includes/simplehtmldom_1_9/example/scraping/example_scraping_digg.php on line 36
    • > PHP Notice
      Undefined variable: ret in wp-content/plugins/portugal-ctt-tracking-woocommerce/includes/simplehtmldom_1_9/example/scraping/example_scraping_digg.php on line 24
    • > post
      Array()
    • > PHP Warning
      include_once(simple_html_dom.php): failed to open stream: No such file or directory in wp-content/plugins/portugal-ctt-tracking-woocommerce/includes/simplehtmldom_1_9/example/scraping/example_scraping_general.php on line 2

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 Passed 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
8 plugin tags: ecommerce, tracking, woocommerce, delivery, shipping...

portugal-ctt-tracking-woocommerce/portugal-ctt-tracking-woocommerce.php Passed 13 tests

The principal PHP file in "Portugal CTT Tracking for WooCommerce" v. 2.0.2 is loaded by WordPress automatically on each request
137 characters long description:
Lets you associate a tracking code with a WooCommerce order so that both the store owner and the client can track the order sent with CTT

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
Good job! No executable or dangerous file extensions detected4,615 lines of code in 131 files:
LanguageFilesBlank linesComment linesLines of code
PHP154794722,648
Markdown11056301,769
YAML160124
XML20059
CSS1108
HTML1106
SVG1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity158.00
▷ Minimum class complexity90.00
▷ Maximum class complexity246.00
Average method complexity5.13
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods114
▷ Static methods21.75%
▷ Public methods9885.96%
▷ Protected methods1513.16%
▷ Private methods10.88%
Functions19
▷ Named functions1789.47%
▷ Anonymous functions210.53%
Constants24
▷ Global constants24100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected