84% frm-modal

Code Review | Formidable Forms Modal

WordPress plugin Formidable Forms Modal scored84%from 54 tests.

About plugin

  • Plugin page: frm-modal
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.8
  • WordPress version: 6.3.1
  • First release: Sep 20, 2017
  • Latest release: Jul 21, 2021
  • Number of updates: 9
  • Update frequency: every 155.9 days
  • Top authors: aman086 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,472 total downloads

Benchmarks

Plugin footprint 83% 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.08MB] [CPU: ▼127.60ms] Passed 4 tests

Server-side resources used by Formidable Forms Modal
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1136.27 ▼4.58
Dashboard /wp-admin3.41 ▼0.0255.14 ▼485.19
Posts /wp-admin/edit.php3.52 ▲0.1649.87 ▼8.99
Add New Post /wp-admin/post-new.php6.01 ▲0.1390.05 ▼11.64
Media Library /wp-admin/upload.php3.33 ▲0.1035.63 ▼1.54
All Formidable Modals /wp-admin/edit.php?post_type=frm-modal3.3738.61
Add New /wp-admin/post-new.php?post_type=frm-modal3.3738.33

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Formidable Forms Modal
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,948 ▲21313.57 ▼0.805.81 ▲3.8437.49 ▼18.50
Dashboard /wp-admin2,242 ▲544.84 ▼0.23105.91 ▲4.2039.44 ▲1.54
Posts /wp-admin/edit.php2,124 ▲352.03 ▲0.0437.15 ▲3.0234.33 ▼1.70
Add New Post /wp-admin/post-new.php1,546 ▲1317.81 ▼5.90682.80 ▲10.0070.83 ▲21.02
Media Library /wp-admin/upload.php1,418 ▲304.41 ▲0.2297.12 ▼2.8041.43 ▼2.20
All Formidable Modals /wp-admin/edit.php?post_type=frm-modal1,0881.9332.1927.79
Add New /wp-admin/post-new.php?post_type=frm-modal1,5472.5755.6766.62

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means 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 items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/frm-modal/inc/admin/views/html-popup-template-preview.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/frm-modal/inc/admin/class-frm-modal-postype.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/frm-modal/inc/admin/class-frm-modal-customizer.php:256
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/frm-modal/inc/admin/class-frm-modal-settings-metabox.php:9

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (Add New Modal Settings), #2 (Modal Overlay Setting with Live Preview Designer), #3 (Modal Container Setting with Live Preview Designer)
The official readme.txt might help

frm-modal/modal.php 92% from 13 tests

The principal PHP file in "Formidable Forms Modal" v. 1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("frm-modal.php" instead of "modal.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected1,131 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP9177147724
CSS1356310
JavaScript313397

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity5.43
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.97
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods32
▷ Static methods412.50%
▷ Public methods2887.50%
▷ Protected methods00.00%
▷ Private methods412.50%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
PNG images were not found in this plugin