84% ruven-themes-shortcodes

Code Review | Ruven Themes: Shortcodes

WordPress plugin Ruven Themes: Shortcodes scored84%from 54 tests.

About plugin

  • Plugin page: ruven-themes-shor...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.0
  • WordPress version: 6.3.1
  • First release: May 29, 2014
  • Latest release: Sep 5, 2014
  • Number of updates: 3
  • Update frequency: every 32.7 days
  • Top authors: Ruven Themes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,223 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.52ms] Passed 4 tests

This is a short check of server-side resources used by Ruven Themes: Shortcodes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.36 ▼4.47
Dashboard /wp-admin3.33 ▲0.0346.76 ▼3.40
Posts /wp-admin/edit.php3.38 ▲0.0349.56 ▲1.78
Add New Post /wp-admin/post-new.php5.91 ▲0.0389.19 ▼4.00
Media Library /wp-admin/upload.php3.26 ▲0.0336.90 ▲2.40

Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
These are issues you should consider
  • Illegal file modification detected: 2 files (0.00KB) outside of "wp-content/plugins/ruven-themes-shortcodes/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/ruven-themes-shortcodes/assets/icon-128\303\227128.png"
    • (new file) "wp-content/plugins/ruven-themes-shortcodes/assets/icon-256\303\227256.png"
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Ruven Themes: Shortcodes: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.48 ▲0.111.82 ▼0.0139.28 ▼5.90
Dashboard /wp-admin2,208 ▲174.85 ▼1.05110.18 ▲7.8137.97 ▼7.10
Posts /wp-admin/edit.php2,091 ▲22.06 ▲0.0639.15 ▲1.4735.09 ▲4.42
Add New Post /wp-admin/post-new.php1,539 ▲618.08 ▼4.98587.71 ▼68.7652.31 ▼3.79
Media Library /wp-admin/upload.php1,384 ▼74.20 ▲0.0298.92 ▼1.1842.30 ▼1.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

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
Good news, no errors were detected

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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ruven-themes-shortcodes/tinymce/tinymce.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/ruven-themes-shortcodes/shortcodes/shortcodes.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/ruven-themes-shortcodes/ruven-themes-shortcodes.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: tinymce, shortcode editor, shortcodes

ruven-themes-shortcodes/ruven-themes-shortcodes.php Passed 13 tests

"Ruven Themes: Shortcodes" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
71 characters long description:
Extends the functionality of Ruven Themes by adding a shortcode editor.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected508 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript11210230
CSS26121140
PHP315446138

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity3.00
▷ Minimum class complexity2.00
▷ Maximum class complexity4.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%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128×128.png5.09KB2.43KB▼ 52.23%
assets/icon-256×256.png4.70KB1.74KB▼ 62.93%
tinymce/rtsc-icon.png0.63KB0.56KB▼ 10.78%