10% mailsales

Code Review | MailSales

WordPress plugin MailSales scored10%from 54 tests.

About plugin

  • Plugin page: mailsales
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 13, 2012
  • Latest release: Dec 13, 2012
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: nordway (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /978 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/mailsales/mailsales.php+83
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼54.16ms] Passed 4 tests

An overview of server-side resources used by MailSales
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.435.30 ▼34.53
Dashboard /wp-admin2.05 ▼1.265.62 ▼45.65
Posts /wp-admin/edit.php2.05 ▼1.317.04 ▼45.34
Add New Post /wp-admin/post-new.php2.05 ▼3.847.67 ▼91.12
Media Library /wp-admin/upload.php2.05 ▼1.184.97 ▼30.21

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_mailsales
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for MailSales
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲14613.98 ▼0.575.48 ▲3.7040.16 ▼1.79
Dashboard /wp-admin2,206 ▲215.91 ▲0.99101.19 ▼8.4938.77 ▼2.36
Posts /wp-admin/edit.php2,089 ▼32.03 ▼0.0148.00 ▲6.2336.92 ▲0.45
Add New Post /wp-admin/post-new.php1,542 ▲2818.19 ▲0.42589.25 ▼91.8752.83 ▲1.35
Media Library /wp-admin/upload.php1,391 ▲64.20 ▲0.0294.35 ▼7.1340.42 ▼3.01

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/mailsales/mailsales.php+83
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_mailsales

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mailsales/mailsales.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Requires at least: Version not formatted correctly
You can take inspiration from this readme.txt

mailsales/mailsales.php Passed 13 tests

The main file in "MailSales" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
81 characters long description:
Subscription form for russian users of service E-mail Marketing (Selling mailing)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected82 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP17969
JavaScript10013

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.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
PNG images were not found in this plugin