93% add-popup-to-tinymce

Code Review | Add Popup To TinyMCE

WordPress plugin Add Popup To TinyMCE scored 93% 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: 5.9.2
  • 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

20+ active / 1,068 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Add Popup To TinyMCE
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0654.73 ▲3.27
Dashboard /wp-admin3.43 ▲0.0232.53 ▼0.88
Posts /wp-admin/edit.php3.65 ▲0.0138.79 ▲2.10
Add New Post /wp-admin/post-new.php6.89 ▼0.08177.90 ▼1,069.19
Media Library /wp-admin/upload.php3.30 ▲0.0127.38 ▲2.20

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, no new options

Browser metrics Passed 4 tests

Add Popup To TinyMCE: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,901 ▲14716.36 ▲0.6510.00 ▲4.232.26 ▼0.55
Dashboard /wp-admin2,895 ▲416.02 ▼0.13125.19 ▼11.84158.30 ▼6.72
Posts /wp-admin/edit.php2,688 ▼33.24 ▼0.0066.41 ▲0.90148.91 ▲5.43
Add New Post /wp-admin/post-new.php1,696 ▼1521.18 ▲0.44446.96 ▼24.54163.38 ▲5.87
Media Library /wp-admin/upload.php1,698 ▼35.51 ▲0.01136.81 ▼5.69194.21 ▲6.67

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 4× 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/add-popup-to-tinymce/class/class-enqueue-scripts.php:42
    • > 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-tinymce-settings.php:51

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • 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: Please replace "Plugin Name" with the name of your plugin on the first line ( === add-popup-to-tinymce === )
Please take inspiration from this readme.txt

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

The main PHP file in "Add Popup To TinyMCE" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • 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")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
There were no executable files found in this plugin1,790 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript43801601,363
CSS2356318
PHP43317109

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin