84% woocom-cc-invoice

Code Review | WooCom CC Invoice

WordPress plugin WooCom CC Invoice scored84%from 54 tests.

About plugin

  • Plugin page: woocom-cc-invoice
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.8
  • WordPress version: 6.3.1
  • First release: Oct 13, 2017
  • Latest release: Oct 13, 2017
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: rnaby (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /749 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.15MB] [CPU: ▼3.42ms] Passed 4 tests

A check of server-side resources used by WooCom CC Invoice
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1326.34 ▼9.08
Dashboard /wp-admin3.46 ▲0.1653.22 ▲1.69
Posts /wp-admin/edit.php3.57 ▲0.2248.84 ▲3.25
Add New Post /wp-admin/post-new.php6.04 ▲0.1585.73 ▼9.42
Media Library /wp-admin/upload.php3.38 ▲0.1535.80 ▲3.14
Invoice Sharing /wp-admin/admin.php?page=woocom-cc-invoice-settings3.3532.27

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WooCom CC Invoice
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲14013.61 ▼0.675.26 ▲3.4837.38 ▼4.17
Dashboard /wp-admin2,206 ▲175.86 ▲0.97108.28 ▼3.7537.97 ▼4.04
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0239.05 ▲2.2435.13 ▼0.62
Add New Post /wp-admin/post-new.php1,542 ▲2018.10 ▼5.17606.17 ▼61.0856.09 ▲9.19
Media Library /wp-admin/upload.php1,382 ▼34.30 ▲0.1194.85 ▼5.1943.66 ▼1.37
Invoice Sharing /wp-admin/admin.php?page=woocom-cc-invoice-settings8532.1924.0523.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'TheDramatist\\WooComCCInvoice\\Email\\WC_Email' not found in wp-content/plugins/woocom-cc-invoice/src/Email/Email.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function TheDramatist\\WooComCCInvoice\\register_activation_hook() in wp-content/plugins/woocom-cc-invoice/woocom-cc-invoice.php:27

User-side errors Passed 1 test

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

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
4 plugin tags: woocommerce, email, invoice, user

woocom-cc-invoice/woocom-cc-invoice.php Passed 13 tests

The principal PHP file in "WooCom CC Invoice" v. 1.0.0 is loaded by WordPress automatically on each request
63 characters long description:
Helps user to send CC of the invoice to other third party email

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 detected1,268 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP131473821,114
JavaScript171572
Markdown218031
JSON20025
XML10015
CSS11011

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity11.00
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods56
▷ Static methods35.36%
▷ Public methods5598.21%
▷ Protected methods00.00%
▷ Private methods11.79%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.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
No PNG images were found in this plugin