84% modal

Code Review | Modal

WordPress plugin Modal scored84%from 54 tests.

About plugin

  • Plugin page: modal
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.0-3.5.2
  • WordPress version: 6.3.1
  • First release: Jul 29, 2013
  • Latest release: Jul 29, 2013
  • Number of updates: 25
  • Update frequency: N/A
  • Top authors: ziodave (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /4,125 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

Server-side resources used by Modal
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.47 ▼1.00
Dashboard /wp-admin3.31 ▲0.0050.32 ▼1.00
Posts /wp-admin/edit.php3.36 ▲0.0048.30 ▼0.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.84 ▼13.80
Media Library /wp-admin/upload.php3.23 ▲0.0034.39 ▼1.80

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Modal
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.201.67 ▼0.2041.51 ▼1.39
Dashboard /wp-admin2,200 ▲95.83 ▼0.05102.56 ▲0.2838.44 ▼8.77
Posts /wp-admin/edit.php2,092 ▲61.97 ▼0.0840.49 ▲0.3234.75 ▼3.95
Add New Post /wp-admin/post-new.php1,514 ▼1917.74 ▼5.65669.68 ▼10.1151.75 ▼2.02
Media Library /wp-admin/upload.php1,388 ▲64.41 ▲0.1893.91 ▼8.1543.11 ▲0.75

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% 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 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/modal/modal.php:81

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: modal post, dialog, modal dialog, modal page, modal...

modal/modal.php Passed 13 tests

The main PHP script in "Modal" version 1.0.7 is automatically included on every request by WordPress
55 characters long description:
A modal plug-in to embed the sign-up form in your blog.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin371 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS22342261
PHP1141058
JavaScript110052

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.57
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
12 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-bg_highlight-soft_15_cc0000_1x100.png0.31KB0.18KB▼ 43.48%
css/images/ui-bg_flat_75_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
css/images/ui-icons_004276_256x240.png4.44KB4.17KB▼ 6.02%
css/images/ui-bg_diagonals-thick_75_f3d8d8_40x40.png0.40KB0.15KB▼ 61.99%
css/images/ui-bg_dots-small_65_a6a6a6_2x2.png0.20KB0.08KB▼ 57.97%