84% tinymce-code-element

Code Review | TinyMCE Code Element

WordPress plugin TinyMCE Code Element scored84%from 54 tests.

About plugin

  • Plugin page: tinymce-code-element
  • Plugin version: 0.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 6.3.1
  • First release: Jun 24, 2013
  • Latest release: Jun 24, 2013
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: miyauchi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,712 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.02MB] [CPU: ▼5.23ms] Passed 4 tests

This is a short check of server-side resources used by TinyMCE Code Element
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0136.71 ▼7.12
Dashboard /wp-admin3.32 ▲0.0247.05 ▼4.30
Posts /wp-admin/edit.php3.38 ▲0.0249.66 ▼0.09
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.87 ▼9.41
Media Library /wp-admin/upload.php3.25 ▲0.0238.11 ▲3.05

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

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

Browser metrics Passed 4 tests

TinyMCE Code Element: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲514.34 ▼0.221.63 ▼0.2839.46 ▲0.68
Dashboard /wp-admin2,197 ▲205.65 ▲0.1293.98 ▲0.5844.06 ▲4.19
Posts /wp-admin/edit.php2,099 ▼11.98 ▼0.0039.07 ▲1.6534.83 ▼3.42
Add New Post /wp-admin/post-new.php1,538 ▲1018.31 ▼4.77624.02 ▼31.3967.83 ▲9.44
Media Library /wp-admin/upload.php1,399 ▼14.26 ▲0.08101.05 ▼10.2442.38 ▼1.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

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)
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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/tinymce-code-element/tinymce-code-element.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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: tinymce, rich editor, code, visual editor

tinymce-code-element/tinymce-code-element.php Passed 13 tests

This is the main PHP file of "TinyMCE Code Element" version 0.5.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
47 characters long description:
Add button for code element to the rich editor.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin143 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP220897
JavaScript29646

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity3.50
▷ 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
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
mce_plugins/code-element/img/icon.png0.34KB0.38KB0.00%