78% email-notice-wp-document-revisions

Code Review | Email Notice for WP Document Revisions

WordPress plugin Email Notice for WP Document Revisions scored78%from 54 tests.

About plugin

  • Plugin page: email-notice-wp-d...
  • Plugin version: 2.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Jun 6, 2023
  • Latest release: Sep 14, 2023
  • Number of updates: 5
  • Update frequency: every 20.0 days
  • Top authors: nwjames (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /193 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.71ms] Passed 4 tests

Analyzing server-side resources used by Email Notice for WP Document Revisions
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.99 ▼0.56
Dashboard /wp-admin3.31 ▲0.0142.49 ▼3.92
Posts /wp-admin/edit.php3.36 ▲0.0043.54 ▼4.42
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.16 ▼17.94
Media Library /wp-admin/upload.php3.23 ▲0.0035.59 ▲2.54

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Email Notice for WP Document Revisions
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲4214.72 ▲0.371.83 ▲0.1937.42 ▼5.68
Dashboard /wp-admin2,203 ▲225.55 ▼0.1684.06 ▼14.8236.73 ▼2.27
Posts /wp-admin/edit.php2,117 ▲172.01 ▲0.0636.81 ▼3.5734.99 ▲0.15
Add New Post /wp-admin/post-new.php1,443 ▼8516.92 ▼6.10511.10 ▼73.7827.83 ▼30.86
Media Library /wp-admin/upload.php1,414 ▲204.18 ▼0.0596.61 ▼7.0638.69 ▼7.28

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/email-notice-wp-document-revisions/uninstall.php
    • > /wp-content/plugins/email-notice-wp-document-revisions/wpdr-email-notice.php
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/email-notice-wp-document-revisions/includes/class-wpdr-en-ext-user-table.php on line 11
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/email-notice-wp-document-revisions/includes/class-wpdr-en-ext-log-table.php on line 11
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/email-notice-wp-document-revisions/includes/class-wpdr-en-ext-log-table.php on line 11
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/email-notice-wp-document-revisions/includes/class-wpdr-en-ext-log-table.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/email-notice-wp-document-revisions/includes/class-wpdr-en-all-users-bulk-action.php:11
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/email-notice-wp-document-revisions/includes/class-wpdr-en-ext-user-table.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/email-notice-wp-document-revisions/includes/class-wpdr-en-user-log-table.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/email-notice-wp-document-revisions/includes/class-wpdr-email-notice.php:11
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/email-notice-wp-document-revisions/includes/class-wpdr-en-ext-user-table.php on line 11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: multisite, e-mail, automatic, administration, user...

email-notice-wp-document-revisions/wpdr-email-notice.php 85% from 13 tests

The entry point to "Email Notice for WP Document Revisions" version 2.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • 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 ("email-notice-wp-document-revisions.php" instead of "wpdr-email-notice.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin2,778 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP73171,3862,567
JavaScript41845211

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity80.40
▷ Minimum class complexity15.00
▷ Maximum class complexity325.00
Average method complexity4.82
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods104
▷ Static methods65.77%
▷ Public methods9288.46%
▷ Protected methods10.96%
▷ Private methods1110.58%
Functions2
▷ Named functions2100.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
No PNG files were detected