94% tinymce-templates

Code Review | TinyMCE Templates

WordPress plugin TinyMCE Templates scored 94% from 54 tests.

About plugin

  • Plugin page: tinymce-templates
  • Plugin version: 4.8.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 5.8.1
  • First release: Nov 20, 2010
  • Latest release: Sep 6, 2017
  • Number of updates: 133
  • Update frequency: every 19.1 days
  • Top authors: miyauchi (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

30,000+ active / 209,112 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼141.36ms] Passed 4 tests

Server-side resources used by TinyMCE Templates
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.1634.82 ▲13.69
Dashboard /wp-admin3.10 ▲0.0547.19 ▲0.39
Posts /wp-admin/edit.php3.19 ▲0.0845.41 ▲0.54
Add New Post /wp-admin/post-new.php5.46 ▲0.0391.51 ▼564.67
Media Library /wp-admin/upload.php3.05 ▲0.0430.83 ▼1.71
Templates /wp-admin/edit.php?post_type=tinymcetemplates3.0933.38
Add New /wp-admin/post-new.php?post_type=tinymcetemplates3.1644.12

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 36 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for TinyMCE Templates
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,747 ▲14115.95 ▲0.3510.65 ▼0.8047.97 ▲1.21
Dashboard /wp-admin3,013 ▲795.88 ▼0.11137.35 ▼13.44106.47 ▼0.58
Posts /wp-admin/edit.php2,785 ▲462.72 ▲0.0164.57 ▼1.6386.29 ▲3.75
Add New Post /wp-admin/post-new.php1,697 ▲1421.72 ▲3.02280.18 ▼159.33109.47 ▲0.40
Media Library /wp-admin/upload.php1,850 ▲1025.03 ▲0.03167.66 ▲20.81113.80 ▼0.65
Templates /wp-admin/edit.php?post_type=tinymcetemplates1,4482.6363.3869.96
Add New /wp-admin/post-new.php?post_type=tinymcetemplates3,1469.14226.76144.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/tinymce-templates/tinymce-templates.php:113

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: tinymce, visual editor, template

tinymce-templates/tinymce-templates.php 92% from 13 tests

The main file in "TinyMCE Templates" v. 4.8.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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 plugin1,604 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PO File14428696842
PHP162149438
JavaScript1392166
CSS21079
LESS110079

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1688.89%
▷ Protected methods00.00%
▷ Private methods211.11%
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

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin