83% raw-html-modal-window

Code Review | Raw HTML Modal Window

WordPress plugin Raw HTML Modal Window scored83%from 54 tests.

About plugin

  • Plugin page: raw-html-modal-wi...
  • Plugin version: 1.1
  • PHP compatiblity: 5.5.37+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0
  • WordPress version: 6.3.1
  • First release: Nov 19, 2018
  • Latest release: Dec 14, 2018
  • Number of updates: 8
  • Update frequency: every 3.3 days
  • Top authors: electricfire (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /650 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.05MB] [CPU: ▼3.12ms] Passed 4 tests

This is a short check of server-side resources used by Raw HTML Modal Window
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0344.76 ▲4.88
Dashboard /wp-admin3.36 ▲0.0649.15 ▲0.88
Posts /wp-admin/edit.php3.48 ▲0.1249.30 ▼2.24
Add New Post /wp-admin/post-new.php5.94 ▲0.0685.86 ▼15.98
Media Library /wp-admin/upload.php3.29 ▲0.0641.97 ▲10.70

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Raw HTML Modal Window: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,870 ▲12413.31 ▼0.992.08 ▲0.0943.09 ▼1.44
Dashboard /wp-admin2,221 ▲364.91 ▲0.04110.43 ▲6.5979.02 ▲36.48
Posts /wp-admin/edit.php2,107 ▲151.98 ▲0.0033.69 ▼8.2433.15 ▼3.78
Add New Post /wp-admin/post-new.php1,536 ▲323.26 ▼0.11775.31 ▲100.8061.34 ▲11.94
Media Library /wp-admin/upload.php1,394 ▲64.11 ▼0.20111.82 ▼2.1482.01 ▲37.62

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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 fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/raw-html-modal-window/modal_window.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Contributors: Plugin contributors not specified
  • Contributors: No tags were detected
You can look at the official readme.txt

raw-html-modal-window/modal_window.php 85% from 13 tests

This is the main PHP file of "Raw HTML Modal Window" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("raw-html-modal-window.php" instead of "modal_window.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 183 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected432 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP3174137309
CSS2241975
JavaScript1282533
HTML12015

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions19
▷ Named functions1157.89%
▷ Anonymous functions842.11%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/images/modal_window_icon.png0.25KB0.18KB▼ 30.50%