72% emercury-for-wp

Code Review | Emercury for WP

WordPress plugin Emercury for WP scored72%from 54 tests.

About plugin

  • Plugin page: emercury-for-wp
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8.1
  • WordPress version: 6.3.1
  • First release: Dec 23, 2019
  • Latest release: Oct 7, 2021
  • Number of updates: 14
  • Update frequency: every 86.1 days
  • Top authors: emercury (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /678 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
Installer ran successfully

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

A check of server-side resources used by Emercury for WP
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1251.99 ▲8.76
Dashboard /wp-admin3.43 ▲0.1262.40 ▲12.88
Posts /wp-admin/edit.php3.54 ▲0.1944.62 ▼3.32
Add New Post /wp-admin/post-new.php6.01 ▲0.1291.69 ▼1.91
Media Library /wp-admin/upload.php3.35 ▲0.1237.78 ▲0.88

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: 1 new table, 7 new options
New tables
wp_emercury_forms
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_emercury_forms_widget
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Emercury for WP
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5614.25 ▲1.022.11 ▼1.6941.93 ▼6.06
Dashboard /wp-admin2,220 ▲405.59 ▲0.0395.75 ▲5.7876.86 ▲34.48
Posts /wp-admin/edit.php2,131 ▲311.99 ▼0.0433.85 ▼2.6035.46 ▼1.15
Add New Post /wp-admin/post-new.php1,550 ▲2423.56 ▲0.36654.85 ▼17.74157.11 ▲105.74
Media Library /wp-admin/upload.php1,428 ▲284.22 ▼0.03102.59 ▼9.6377.82 ▲31.80
Forms /wp-admin/emercury-forms.php260.420.1214.59
Advanced Options /wp-admin/emercury-forms.php?page=emercury_forms_advanced_options260.420.089.22
Settings /wp-admin/emercury-forms.php?page=emercury_forms_settings260.420.098.61

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_emercury_forms_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/emercury-for-wp/php/emercury_wp_admin_header.php
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/emercury-for-wp/includes/functions.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Emercury_API' not found in wp-content/plugins/emercury-for-wp/php/emercury_forms_admin_advanced_options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/emercury-for-wp/php/emercury_forms_admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/emercury-for-wp/php/emercury_forms_admin_settings.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/emercury-for-wp/includes/emercury_forms_widget.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/emercury-forms.php
    • > Network (severe)
    wp-admin/emercury-forms.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/emercury-forms.php?page=emercury_forms_advanced_options
    • > Network (severe)
    wp-admin/emercury-forms.php?page=emercury_forms_advanced_options - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/emercury-forms.php?page=emercury_forms_settings
    • > Network (severe)
    wp-admin/emercury-forms.php?page=emercury_forms_settings - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 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
6 plugin tags: emercury, email, forms, newsletter, marketing...

emercury-for-wp/emercury-forms.php 92% from 13 tests

The main file in "Emercury for WP" v. 1.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("emercury-for-wp.php" instead of "emercury-forms.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin827 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP1023076758
JavaScript110069

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity15.75
▷ Minimum class complexity5.00
▷ Maximum class complexity40.00
Average method complexity2.74
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods34
▷ Static methods1852.94%
▷ Public methods2573.53%
▷ Protected methods00.00%
▷ Private methods926.47%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon.png0.69KB0.81KB0.00%