68% teg-wp-dialog

Code Review | Wordpress dialog

WordPress plugin Wordpress dialog scored 68% from 54 tests.

About plugin

  • Plugin page: teg-wp-dialog
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Jul 14, 2017
  • Latest release: Nov 14, 2017
  • Number of updates: 8
  • Update frequency: every 16.5 days
  • Top authors: themeegg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,197 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.61MB] [CPU: ▼32.85ms] Passed 4 tests

This is a short check of server-side resources used by Wordpress dialog
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3244.21 ▲1.30
Dashboard /wp-admin3.34 ▲0.0324.22 ▼27.25
Posts /wp-admin/edit.php3.34 ▼0.0228.81 ▼19.82
Add New Post /wp-admin/post-new.php3.34 ▼2.5526.74 ▼72.60
Media Library /wp-admin/upload.php3.34 ▲0.1125.08 ▼11.71
All Popup Dialogs /wp-admin/edit.php?post_type=teg-wp-dialog3.3426.46
Settings /wp-admin/edit.php?post_type=teg-wp-dialog&page=teg-wp-dialog3.3425.96
Add New /wp-admin/post-new.php?post_type=teg-wp-dialog3.3425.92

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 74 new files
Database: no new tables, 9 new options
New WordPress options
teg_wp_dialog_version
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
teg_wp_dialog_admin_notices
widget_theysaidso_widget
can_compress_scripts
teg_wp_dialog_db_version
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Wordpress dialog
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,953 ▲21814.03 ▼0.376.81 ▲4.9444.71 ▲0.04
Dashboard /wp-admin2,234 ▲465.79 ▼0.1395.04 ▼13.2437.49 ▼10.56
Posts /wp-admin/edit.php2,120 ▲312.04 ▲0.0234.99 ▼1.5233.81 ▲3.92
Add New Post /wp-admin/post-new.php1,559 ▲4223.05 ▲5.52650.23 ▲36.1051.52 ▲3.82
Media Library /wp-admin/upload.php1,422 ▲374.23 ▲0.0496.26 ▼4.4341.84 ▼0.82
All Popup Dialogs /wp-admin/edit.php?post_type=teg-wp-dialog1,1401.9330.2529.84
Settings /wp-admin/edit.php?post_type=teg-wp-dialog&page=teg-wp-dialog9322.1028.5527.45
Add New /wp-admin/post-new.php?post_type=teg-wp-dialog2,5027.59168.6964.75

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_recent-posts
    • teg_wp_dialog_db_version
    • widget_theysaidso_widget
    • teg_wp_dialog_version
    • db_upgraded
    • teg_wp_dialog_admin_notices
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=teg-wp-dialog
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP Passed 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
Congratulations! This plugin passed the SRP test

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/edit.php?post_type=teg-wp-dialog&page=teg-wp-dialog
    • > Network (severe)
    wp-content/plugins/teg-wp-dialog/assets/js/select2/select2.min.js?ver=1.0.4 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=teg-wp-dialog&page=teg-wp-dialog
    • > Network (severe)
    wp-content/plugins/teg-wp-dialog/assets/js/admin/settings.min.js?ver=1.0.4 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === teg-wp-dialog === )
Please take inspiration from this readme.txt

teg-wp-dialog/teg-wp-dialog.php 85% from 13 tests

"Wordpress dialog" version 1.0.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.0.1" instead of "4.0")
  • Description: Please don't use more than 140 characters for the plugin description (currently 144 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin5,862 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
PHP369661,6292,752
Sass1131602,373
JavaScript12188244731
CSS6006

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity14.71
▷ Minimum class complexity1.00
▷ Maximum class complexity135.00
Average method complexity2.89
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes23
▷ Abstract classes313.04%
▷ Concrete classes2086.96%
▷ Final classes15.00%
Methods177
▷ Static methods7240.68%
▷ Public methods12570.62%
▷ Protected methods2111.86%
▷ Private methods3117.51%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/controls.png1.98KB2.04KB0.00%
assets/images/border.png0.14KB0.16KB0.00%
assets/images/loading_background.png0.13KB0.15KB0.00%