90% tcp-display-vendor

Code Review | Display Vendor Name by TheCartPress

WordPress plugin Display Vendor Name by TheCartPress scored90%from 54 tests.

About plugin

  • Plugin page: tcp-display-vendor
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.0.3
  • WordPress version: 6.3.1
  • First release: Nov 30, 2022
  • Latest release: Nov 30, 2022
  • Number of updates: 2
  • Update frequency: every 28.5 days
  • Top authors: tcpteam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /447 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.30MB] [CPU: ▼4.18ms] Passed 4 tests

This is a short check of server-side resources used by Display Vendor Name by TheCartPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3035.64 ▼7.68
Dashboard /wp-admin3.60 ▲0.3045.05 ▼0.30
Posts /wp-admin/edit.php3.72 ▲0.3648.48 ▼1.78
Add New Post /wp-admin/post-new.php6.18 ▲0.2994.37 ▼6.96
Media Library /wp-admin/upload.php3.53 ▲0.2937.93 ▲4.39

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 73 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Display Vendor Name by TheCartPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,857 ▲12213.37 ▼0.991.65 ▼0.2438.71 ▼10.78
Dashboard /wp-admin2,260 ▲725.89 ▲1.02113.94 ▲11.3244.52 ▼0.13
Posts /wp-admin/edit.php2,145 ▲562.01 ▼0.0142.59 ▲1.1336.97 ▼2.49
Add New Post /wp-admin/post-new.php1,534 ▲1117.56 ▼5.47600.46 ▼84.2162.35 ▼4.40
Media Library /wp-admin/upload.php1,449 ▲614.23 ▼0.1699.09 ▲0.2140.58 ▼4.41

Uninstaller [IO: ▲0.00MB] [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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: thecartpress, vendor, tcp, woocommerce

tcp-display-vendor/tcp-display-vendor.php Passed 13 tests

The main PHP file in "Display Vendor Name by TheCartPress" ver. 1.2.0 adds more information about the plugin and also serves as the entry point for this plugin
78 characters long description:
Display vendor name at WooCommerce product page, cart, checkout and order page

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,952 lines of code in 71 files:
LanguageFilesBlank linesComment linesLines of code
PHP51474131,835
JavaScript62656489
CSS40028

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity18.17
▷ Minimum class complexity6.00
▷ Maximum class complexity40.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods38
▷ Static methods25.26%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions51
▷ Named functions3466.67%
▷ Anonymous functions1733.33%
Constants9
▷ Global constants111.11%
▷ Class constants888.89%
▷ Public constants8100.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
There are no PNG files in this plugin