79% pro-modal

Code Review | Pro Modal

WordPress plugin Pro Modal scored 79% from 54 tests.

About plugin

  • Plugin page: pro-modal
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.2
  • WordPress version: 6.3.1
  • First release: Jan 25, 2018
  • Latest release: Jan 26, 2018
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: truser (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 527 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.02ms] Passed 4 tests

Server-side resources used by Pro Modal
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.92 ▲1.86
Dashboard /wp-admin3.33 ▲0.0245.60 ▲0.08
Posts /wp-admin/edit.php3.38 ▲0.0245.93 ▼0.77
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.00 ▼7.34
Media Library /wp-admin/upload.php3.25 ▲0.0237.71 ▼0.06
Add New Modal /wp-admin/post-new.php?post_type=pro-modal3.3958.24
All Modals /wp-admin/edit.php?post_type=pro-modal3.2945.43

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Pro Modal
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲4413.31 ▲0.052.40 ▲0.8545.20 ▲6.39
Dashboard /wp-admin2,235 ▲295.86 ▲1.0096.91 ▼11.1273.07 ▲32.85
Posts /wp-admin/edit.php2,115 ▲261.99 ▼0.0541.67 ▲1.5240.75 ▲6.84
Add New Post /wp-admin/post-new.php1,537 ▲421.67 ▲0.30882.29 ▲137.9069.90 ▲19.91
Media Library /wp-admin/upload.php1,414 ▲264.10 ▼0.10103.82 ▼6.4174.00 ▲29.64
Add New Modal /wp-admin/post-new.php?post_type=pro-modal2,3097.72202.30128.72
All Modals /wp-admin/edit.php?post_type=pro-modal1,0761.9937.0537.53

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=pro-modal
    • > Warning in wp-content/plugins/pro-modal/pro-modal.php+60
    in_array() expects parameter 2 to be array, string given

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 trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pro-modal/pro-modal.php:16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 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
4 plugin tags: wordpress add modal, wordpress modal create, modal create, wordpress modals

pro-modal/pro-modal.php Passed 13 tests

"Pro Modal" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
84 characters long description:
Create your pro modals, edit and publish! It's that easy! Easy, fast, modern, no ad!

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
Good job! No executable or dangerous file extensions detected397 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS1223213
PHP1179160
JavaScript12024

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.65
Average class complexity41.00
▷ Minimum class complexity41.00
▷ Maximum class complexity41.00
Average method complexity6.71
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/icon.png18.29KB1.12KB▼ 93.87%