84% wp-mail-rest-api

Code Review | WP Mail REST-API

WordPress plugin WP Mail REST-API scored84%from 54 tests.

About plugin

  • Plugin page: wp-mail-rest-api
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Jan 22, 2020
  • Latest release: Jan 22, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: marketingauftrag (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /647 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.73ms] Passed 4 tests

Server-side resources used by WP Mail REST-API
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0536.06 ▼6.08
Dashboard /wp-admin3.36 ▲0.0649.43 ▼8.32
Posts /wp-admin/edit.php3.41 ▲0.0644.42 ▼0.85
Add New Post /wp-admin/post-new.php5.94 ▲0.0688.77 ▼7.67
Media Library /wp-admin/upload.php3.29 ▲0.0636.62 ▲3.34
WP Mail REST-API Target Webhooks /wp-admin/options-general.php?page=wp-mail-rest-api3.2931.42
WP Mail REST-API Webhooks Log /wp-admin/options-general.php?page=wp-mail-rest-api-log3.2833.85

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WP Mail REST-API
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.24 ▼0.481.56 ▼0.3744.61 ▼0.01
Dashboard /wp-admin2,203 ▲295.63 ▲0.0682.75 ▼20.9740.75 ▼1.76
Posts /wp-admin/edit.php2,108 ▲82.03 ▼0.0142.64 ▲1.0236.49 ▼2.07
Add New Post /wp-admin/post-new.php1,532 ▲623.39 ▲0.38624.77 ▼17.8589.35 ▲23.46
Media Library /wp-admin/upload.php1,405 ▲24.17 ▼0.0699.10 ▼1.1344.50 ▲2.03
WP Mail REST-API Target Webhooks /wp-admin/options-general.php?page=wp-mail-rest-api9022.0023.2027.20
WP Mail REST-API Webhooks Log /wp-admin/options-general.php?page=wp-mail-rest-api-log8242.0225.5425.02

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-mail-rest-api/log-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-mail-rest-api/webhooks-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-mail-rest-api/wp-mail-rest-api.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 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
2 plugin tags: rest api, wp mail

wp-mail-rest-api/wp-mail-rest-api.php Passed 13 tests

Analyzing the main PHP file in "WP Mail REST-API" version 1.0.0
44 characters long description:
Send wordpess emails through Zaiper and IFTT

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 detected716 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4222413716

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity46.50
▷ Minimum class complexity38.00
▷ Maximum class complexity55.00
Average method complexity3.84
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods32
▷ Static methods13.12%
▷ Public methods2165.62%
▷ Protected methods1031.25%
▷ Private methods13.12%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin