84% lasting-sales

Code Review | LastingSales - For Contact Form 7

WordPress plugin LastingSales - For Contact Form 7 scored84%from 54 tests.

About plugin

  • Plugin page: lasting-sales
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.1
  • WordPress version: 6.3.1
  • First release: Mar 16, 2023
  • Latest release: Mar 16, 2023
  • Number of updates: 3
  • Update frequency: every 2.0 days
  • Top authors: lastingsales (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /310 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.22ms] Passed 4 tests

This is a short check of server-side resources used by LastingSales - For Contact Form 7
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0835.07 ▼7.14
Dashboard /wp-admin3.40 ▲0.0945.60 ▼3.12
Posts /wp-admin/edit.php3.51 ▲0.1546.15 ▼1.86
Add New Post /wp-admin/post-new.php6.00 ▲0.1183.75 ▼8.77
Media Library /wp-admin/upload.php3.32 ▲0.0942.79 ▲6.01

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 29 new files
Database: 1 new table, 6 new options
New tables
wp_lasting_sales_config
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for LastingSales - For Contact Form 7
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,929 ▲19413.57 ▼0.804.82 ▲3.0838.55 ▼7.35
Dashboard /wp-admin2,215 ▲244.91 ▲0.01109.04 ▼0.6972.86 ▲30.62
Posts /wp-admin/edit.php2,113 ▲242.05 ▲0.0439.10 ▼2.2830.67 ▼4.00
Add New Post /wp-admin/post-new.php1,686 ▲15322.78 ▼0.42731.04 ▲54.9740.41 ▼15.40
Media Library /wp-admin/upload.php1,470 ▲824.23 ▲0.00102.16 ▼0.5380.40 ▲36.28

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_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 items
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/lasting-sales/public/partials/lasting-sales-public-display.php
    • > /wp-content/plugins/lasting-sales/includes/class-wpcf7-function.php
    • > /wp-content/plugins/lasting-sales/admin/partials/lasting-sales-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: sales, wpcf7, lasting

lasting-sales/lasting-sales.php 92% from 13 tests

The main file in "LastingSales - For Contact Form 7" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 200 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected539 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP14185571527
JavaScript34607
CSS37395

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.12
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods24
▷ Static methods28.33%
▷ Public methods1979.17%
▷ Protected methods00.00%
▷ Private methods520.83%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/lasting-sales.png1.37KB0.82KB▼ 40.44%
admin/images/favicon.png1.95KB1.34KB▼ 31.52%
admin/images/lasting-sales-logo-dark.png6.74KB3.27KB▼ 51.52%