10% cyb-mail

Code Review | CYB Mail

WordPress plugin CYB Mail scored10%from 54 tests.

About plugin

  • Plugin page: cyb-mail
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Sep 19, 2018
  • Latest release: Sep 26, 2018
  • Number of updates: 5
  • Update frequency: every 2.4 days
  • Top authors: christianezeani (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /610 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/cyb-mail/core/functions.php+29
    Only variables should be passed by reference

Server metrics [RAM: ▼1.92MB] [CPU: ▼51.94ms] Passed 4 tests

Server-side resources used by CYB Mail
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.394.21 ▼37.09
Dashboard /wp-admin2.08 ▼1.227.15 ▼41.53
Posts /wp-admin/edit.php2.09 ▼1.275.85 ▼44.11
Add New Post /wp-admin/post-new.php2.08 ▼3.806.01 ▼85.03
Media Library /wp-admin/upload.php2.08 ▼1.145.31 ▼29.53
Mail /wp-admin/options-general.php?page=cyb-mail2.096.29

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 41 new files
Database: 1 new table, 6 new options
New tables
wp_cyb_mail
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for CYB Mail
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.17 ▼1.231.60 ▼0.2045.14 ▲0.90
Dashboard /wp-admin2,210 ▲255.81 ▼0.0498.68 ▼9.8537.30 ▼5.40
Posts /wp-admin/edit.php2,090 ▼22.03 ▼0.0139.11 ▼1.4936.88 ▲1.57
Add New Post /wp-admin/post-new.php1,545 ▲3118.14 ▲0.54605.44 ▼74.6257.09 ▼0.75
Media Library /wp-admin/upload.php1,395 ▲74.19 ▼0.0496.74 ▼6.0841.67 ▲1.07
Mail /wp-admin/options-general.php?page=cyb-mail8122.2128.8224.58

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/cyb-mail/core/functions.php+29
    Only variables should be passed by reference
  • Zombie tables detected upon uninstall: 1 table
    • wp_cyb_mail
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=cyb-mail
    • > Notice in wp-content/plugins/cyb-mail/core/functions.php+29
    Only variables should be passed by reference
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=cyb-mail
    • > Notice in wp-content/plugins/cyb-mail/core/autoload.php+16
    Undefined offset: 1
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=cyb-mail
    • > Notice in wp-content/plugins/cyb-mail/core/autoload.php+16
    Undefined offset: 2

SRP 0% 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
  • 20× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/cyb-mail/core/installers.php
    • > /wp-content/plugins/cyb-mail/core/classes/Core.php
    • > /wp-content/plugins/cyb-mail/hooks/mail.php
    • > /wp-content/plugins/cyb-mail/hooks/scripts.php
    • > /wp-content/plugins/cyb-mail/core/database/Schema.php
    • > /wp-content/plugins/cyb-mail/core/classes/Model.php
    • > /wp-content/plugins/cyb-mail/cyb-mail.php
    • > /wp-content/plugins/cyb-mail/pages/index.php
    • > /wp-content/plugins/cyb-mail/core/classes/Schema.php
    • > /wp-content/plugins/cyb-mail/core/autoload.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'CYB\\Classes\\Model' not found in wp-content/plugins/cyb-mail/models/CYBMail.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'CYB\\Classes\\Schema' not found in wp-content/plugins/cyb-mail/schema/CYBMailSchema.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: email, cyb-mail, mailgun, smtp, gmail

cyb-mail/cyb-mail.php Passed 13 tests

Analyzing the main PHP file in "CYB Mail" version 1.0.1
127 characters long description:
Adds advanced Mail Configuration to your Wordpress blog. Use Gmail, Mailgun, and your preferred SMTP server for outgoing mails.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,553 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP223851941,279
JavaScript54726243
CSS3101031

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity15.50
▷ Minimum class complexity1.00
▷ Maximum class complexity79.00
Average method complexity2.81
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods80
▷ Static methods56.25%
▷ Public methods4455.00%
▷ Protected methods2126.25%
▷ Private methods1518.75%
Functions18
▷ Named functions1794.44%
▷ Anonymous functions15.56%
Constants14
▷ Global constants1285.71%
▷ Class constants214.29%
▷ Public constants2100.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
2 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/screenshot-2.png32.16KB16.82KB▼ 47.69%
assets/images/screenshot-1.png4.40KB3.01KB▼ 31.70%