68% ere-download-document

Code Review | ERE Download Document

WordPress plugin ERE Download Document scored68%from 54 tests.

About plugin

  • Plugin page: ere-download-docu...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7.2
  • WordPress version: 6.3.1
  • First release: Sep 18, 2019
  • Latest release: Jul 15, 2021
  • Number of updates: 5
  • Update frequency: every 133.6 days
  • Top authors: g5theme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /4,868 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼6.57ms] Passed 4 tests

Server-side resources used by ERE Download Document
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3246.78 ▲2.41
Dashboard /wp-admin3.41 ▲0.1148.64 ▼5.62
Posts /wp-admin/edit.php3.52 ▲0.1749.47 ▲0.52
Add New Post /wp-admin/post-new.php5.99 ▲0.1085.28 ▼23.57
Media Library /wp-admin/upload.php3.33 ▲0.1036.80 ▲4.50
Download Management /wp-admin/admin.php?page=ered-download-management3.3137.41
Settings /wp-admin/admin.php?page=ered-settings3.3034.77

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 32 new files
Database: 1 new table, 6 new options
New tables
wp_ered_email_download
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for ERE Download Document
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,005 ▲25913.79 ▲0.438.41 ▲4.1442.09 ▼2.92
Dashboard /wp-admin2,251 ▲664.96 ▼0.86111.15 ▼4.0440.62 ▼4.89
Posts /wp-admin/edit.php2,131 ▲422.11 ▲0.1138.54 ▲2.4433.11 ▲0.68
Add New Post /wp-admin/post-new.php1,550 ▲3023.21 ▲0.10647.84 ▼37.8036.81 ▼16.29
Media Library /wp-admin/upload.php1,424 ▲394.29 ▲0.1098.99 ▼1.2141.46 ▼1.07
Download Management /wp-admin/admin.php?page=ered-download-management8861.9224.6227.51
Settings /wp-admin/admin.php?page=ered-settings8871.9224.6127.29

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie tables were found after uninstall: 1 table
    • wp_ered_email_download
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, 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
The following issues need your attention
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ere-download-document/inc/admin.class.php
    • > /wp-content/plugins/ere-download-document/inc/ajax.class.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ere-download-document/admin/templates/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ere-download-document/templates/popup.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ERED() in wp-content/plugins/ere-download-document/admin/templates/download-management.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ere-download-document/inc/functions.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: download, download document, essential real estate, real estate, property...

ere-download-document/ere-download-document.php 92% from 13 tests

This is the main PHP file of "ERE Download Document" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin3,571 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript114011651,924
CSS81401541,048
PHP9103110599

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity7.20
▷ Minimum class complexity2.00
▷ Maximum class complexity13.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods44
▷ Static methods511.36%
▷ Public methods44100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected