10% ultimate-post-by-mail

Code Review | Ultimate Post by Mail

WordPress plugin Ultimate Post by Mail scored10%from 54 tests.

About plugin

  • Plugin page: ultimate-post-by-...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.2-4.3.1
  • WordPress version: 6.3.1
  • First release: Nov 4, 2015
  • Latest release: Nov 4, 2015
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: comwes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,397 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/ultimate-post-by-mail/upostbymail.php+29
    Constant WP_DEBUG already defined

Server metrics [RAM: ▼1.93MB] [CPU: ▼58.90ms] Passed 4 tests

An overview of server-side resources used by Ultimate Post by Mail
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.414.52 ▼43.95
Dashboard /wp-admin2.07 ▼1.235.53 ▼45.25
Posts /wp-admin/edit.php2.07 ▼1.286.80 ▼49.30
Add New Post /wp-admin/post-new.php2.07 ▼3.816.08 ▼97.08
Media Library /wp-admin/upload.php2.07 ▼1.165.41 ▼32.82
U Post by Mail /wp-admin/options-general.php?page=cws-mail-configuration2.078.00

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ultimate Post by Mail
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.38 ▼1.171.63 ▼0.5740.06 ▲3.25
Dashboard /wp-admin2,212 ▲215.83 ▲0.8795.90 ▼10.8640.29 ▼4.08
Posts /wp-admin/edit.php2,095 ▲62.04 ▲0.0141.52 ▲3.8336.65 ▲2.51
Add New Post /wp-admin/post-new.php1,533 ▲1423.30 ▲0.02628.58 ▼14.5352.70 ▼3.51
Media Library /wp-admin/upload.php1,397 ▲154.23 ▲0.0198.73 ▼2.9042.71 ▼1.45
U Post by Mail /wp-admin/options-general.php?page=cws-mail-configuration9591.7126.8246.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/ultimate-post-by-mail/upostbymail.php+29
    Constant WP_DEBUG already defined
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=cws-mail-configuration
    • > Notice in wp-content/plugins/ultimate-post-by-mail/upostbymail.php+29
    Constant WP_DEBUG already defined
    • > GET request to /wp-admin/options-general.php?page=cws-mail-configuration
    • > Notice in wp-content/plugins/ultimate-post-by-mail/admin/CWSAdmin.class.php+56
    Undefined index: tab
    • > GET request to /wp-admin/options-general.php?page=cws-mail-configuration
    • > Notice in wp-content/plugins/ultimate-post-by-mail/includes/CWSMailChecker.class.php+297
    Undefined index: cws_mail_security

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ultimate-post-by-mail/upostbymail.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'CWSAdmin' not found in wp-content/plugins/ultimate-post-by-mail/admin/CWSMailConfigurationServer.view.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'CWSAdmin' not found in wp-content/plugins/ultimate-post-by-mail/admin/CWSMailConfigurationPost.view.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'CWSAdmin' not found in wp-content/plugins/ultimate-post-by-mail/admin/CWSMailConfiguration.view.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 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
7 plugin tags: post by mail, postie, mail, publish, ultimate post by mail...

ultimate-post-by-mail/upostbymail.php 77% from 13 tests

"Ultimate Post by Mail" version 2.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 257 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("ultimate-post-by-mail.php" instead of "upostbymail.php")

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
Everything looks great! No dangerous files found in this plugin804 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP850188638
PO File15060137
JavaScript22129

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity24.75
▷ Minimum class complexity3.00
▷ Maximum class complexity46.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods39
▷ Static methods2974.36%
▷ Public methods3282.05%
▷ Protected methods00.00%
▷ Private methods717.95%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected