64% email-reports

Code Review | Email report

WordPress plugin Email report scored64%from 54 tests.

About plugin

  • Plugin page: email-reports
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-3.8.1
  • WordPress version: 6.3.1
  • First release: Mar 18, 2014
  • Latest release: Mar 19, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: nicubalti (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /785 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

This is a short check of server-side resources used by Email report
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.57 ▼35.42
Dashboard /wp-admin2.05 ▼1.265.86 ▼41.14
Posts /wp-admin/edit.php2.05 ▼1.317.31 ▼44.04
Add New Post /wp-admin/post-new.php2.05 ▼3.846.26 ▼97.25
Media Library /wp-admin/upload.php2.05 ▼1.185.60 ▼29.05

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 4 new files
Database: 2 new tables, 6 new options
New tables
wp_email_reports_user_config
wp_email_reports_config
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Email report
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲8713.29 ▼1.331.62 ▼0.3542.49 ▼8.95
Dashboard /wp-admin2,227 ▲394.86 ▼0.0296.63 ▼4.6338.83 ▼5.81
Posts /wp-admin/edit.php2,107 ▲182.11 ▲0.0635.68 ▼4.7431.79 ▼6.16
Add New Post /wp-admin/post-new.php1,548 ▲3423.12 ▲5.71584.39 ▼104.8855.90 ▲1.23
Media Library /wp-admin/upload.php1,406 ▲154.21 ▼0.0194.94 ▼4.3742.33 ▲0.52

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie tables were found after uninstall: 2 tables
    • wp_email_reports_config
    • wp_email_reports_user_config
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

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
Good news, no errors were detected

SRP 50% 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
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/email-reports/email-reports.php on line 12
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/email-reports/email-reports.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/email-reports/email-reports.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: publish, page, email, report, post

email-reports/email-reports.php Passed 13 tests

The primary PHP file in "Email report" version 1.0 is used by WordPress to initiate all plugin functionality
95 characters long description:
The plugin is destined for sending email notification to the users on publish a post or a page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin297 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1258251
JavaScript110932
CSS11014

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin