89% sliced-invoices-contact-form-7

Code Review | Sliced Invoices & Contact Form 7

WordPress plugin Sliced Invoices & Contact Form 7 scored89%from 54 tests.

About plugin

  • Plugin page: sliced-invoices-c...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Feb 1, 2016
  • Latest release: May 27, 2022
  • Number of updates: 34
  • Update frequency: every 68.1 days
  • Top authors: SlicedInvoices (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /6,550 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.58ms] Passed 4 tests

An overview of server-side resources used by Sliced Invoices & Contact Form 7
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.23 ▼6.91
Dashboard /wp-admin3.31 ▲0.0146.12 ▼2.72
Posts /wp-admin/edit.php3.36 ▲0.0046.47 ▼7.33
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.31 ▲6.11
Media Library /wp-admin/upload.php3.23 ▲0.0037.16 ▲2.66

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Sliced Invoices & Contact Form 7
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲10913.25 ▼1.045.03 ▲3.1842.10 ▼2.65
Dashboard /wp-admin2,225 ▲404.86 ▼0.23108.22 ▲1.8940.57 ▼5.21
Posts /wp-admin/edit.php2,107 ▲182.01 ▼0.0141.39 ▲3.2036.62 ▲1.28
Add New Post /wp-admin/post-new.php1,551 ▲1823.12 ▲0.03593.72 ▼65.3557.24 ▲5.78
Media Library /wp-admin/upload.php1,404 ▲134.28 ▼0.0196.21 ▼0.3342.47 ▲0.15

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can take inspiration from this readme.txt

sliced-invoices-contact-form-7/sliced-invoices-contact-form-7.php Passed 13 tests

The entry point to "Sliced Invoices & Contact Form 7" version 1.1.3 is a PHP file that has certain tags in its header comment area
133 characters long description:
Create forms that allow users to submit a quote or estimate request. Requirements: The Sliced Invoices Plugin & Contact Form 7 Plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin295 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP29290295

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity74.00
▷ Minimum class complexity74.00
▷ Maximum class complexity74.00
Average method complexity10.12
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 1.22MB with 0.88MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png299.90KB81.72KB▼ 72.75%
screenshot-3.png132.66KB34.81KB▼ 73.76%
screenshot-1.png433.05KB128.19KB▼ 70.40%
screenshot-2.png385.78KB111.70KB▼ 71.05%