83% add-popup-to-tinymce

Code Review | Add Popup To TinyMCE

WordPress plugin Add Popup To TinyMCE scored83%from 54 tests.

About plugin

  • Plugin page: add-popup-to-tinymce
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.7
  • WordPress version: 6.3.1
  • First release: Nov 15, 2016
  • Latest release: Nov 15, 2016
  • Number of updates: 6
  • Update frequency: every 7.0 days
  • Top authors: ayush.malakar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,310 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.09ms] Passed 4 tests

A check of server-side resources used by Add Popup To TinyMCE
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0337.71 ▼6.46
Dashboard /wp-admin3.33 ▼0.0246.78 ▼12.69
Posts /wp-admin/edit.php3.39 ▲0.0244.92 ▼1.05
Add New Post /wp-admin/post-new.php5.92 ▲0.0283.75 ▼0.14
Media Library /wp-admin/upload.php3.26 ▲0.0234.15 ▲2.00

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Add Popup To TinyMCE
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲10613.93 ▼0.629.05 ▲7.2141.12 ▲0.21
Dashboard /wp-admin2,192 ▲125.47 ▼0.1986.63 ▼0.4337.63 ▼2.60
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0035.29 ▲0.1330.62 ▼9.10
Add New Post /wp-admin/post-new.php1,536 ▲1023.31 ▼0.29689.88 ▲17.9255.15 ▲0.49
Media Library /wp-admin/upload.php1,397 ▼04.24 ▼0.0896.43 ▼8.4243.04 ▼0.92

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/add-popup-to-tinymce/add-popup-to-tiny-mce.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-popup-to-tinymce/class/class-popup-shortcode.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-popup-to-tinymce/class/class-enqueue-scripts.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-popup-to-tinymce/class/class-tinymce-settings.php:51

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

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === add-popup-to-tinymce === )
The official readme.txt might help

add-popup-to-tinymce/add-popup-to-tiny-mce.php 85% from 13 tests

The main PHP script in "Add Popup To TinyMCE" version 1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("add-popup-to-tinymce.php" instead of "add-popup-to-tiny-mce.php")

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
No dangerous file extensions were detected1,790 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript43801601,363
CSS2356318
PHP43317109

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity3.00
▷ Minimum class complexity2.00
▷ Maximum class complexity5.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods325.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There are no PNG files in this plugin