93% olevmedia-shortcodes

Code Review | Olevmedia Shortcodes

WordPress plugin Olevmedia Shortcodes scored 93% from 54 tests.

About plugin

  • Plugin page: olevmedia-shortcodes
  • Plugin version: 1.1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9.8
  • WordPress version: 5.9.2
  • First release: Sep 25, 2013
  • Latest release: Aug 8, 2018
  • Number of updates: 16
  • Update frequency: every 111.2 days
  • Top authors: Olevmedia (100%)

Code review

54 tests

User reviews

26 reviews

Install metrics

10,000+ active / 81,085 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.71MB] [CPU: ▼289.54ms] Passed 4 tests

Server-side resources used by Olevmedia Shortcodes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.28 ▲0.7760.78 ▲8.61
Dashboard /wp-admin4.12 ▲0.7136.47 ▲3.25
Posts /wp-admin/edit.php4.34 ▲0.7042.72 ▲6.08
Add New Post /wp-admin/post-new.php7.68 ▲0.6896.70 ▼1,174.33
Media Library /wp-admin/upload.php4.05 ▲0.7630.55 ▲6.85

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Olevmedia Shortcodes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,950 ▲22816.65 ▲1.0511.39 ▲5.612.82 ▲0.60
Dashboard /wp-admin2,926 ▲726.81 ▲0.66123.77 ▼10.12171.86 ▲14.91
Posts /wp-admin/edit.php2,732 ▲413.54 ▲0.3067.18 ▲6.01157.69 ▲17.91
Add New Post /wp-admin/post-new.php1,735 ▲6720.84 ▲1.89445.50 ▲34.23170.67 ▲20.31
Media Library /wp-admin/upload.php1,731 ▲305.94 ▲0.40124.24 ▼23.48187.12 ▲1.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/olevmedia-shortcodes/functions/workup-shortcodes.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/olevmedia-shortcodes/functions/interface-options.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/olevmedia-shortcodes/functions/workup-shortcodes.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/olevmedia-shortcodes/om-shortcodes.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/olevmedia-shortcodes/functions/interface-options.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/olevmedia-shortcodes/functions/button.php:233
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/olevmedia-shortcodes/functions/interface-shortcodes-generator.php:612
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/olevmedia-shortcodes/functions/js-strings-translation.php:18

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)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Tags: Please delete some tags, you are using 26 tag instead of maximum 10
You can look at the official readme.txt

olevmedia-shortcodes/om-shortcodes.php 85% from 13 tests

Analyzing the main PHP file in "Olevmedia Shortcodes" version 1.1.9
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("olevmedia-shortcodes.php" instead of "om-shortcodes.php")
  • Description: The description should be shorter than 140 characters (currently 142 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin7,482 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP109266635,015
CSS52511011,251
JavaScript41355450
SVG100414
PO File1156174352

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity163.50
▷ Minimum class complexity130.00
▷ Maximum class complexity197.00
Average method complexity4.82
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods85
▷ Static methods11.18%
▷ Public methods6981.18%
▷ Protected methods1618.82%
▷ Private methods00.00%
Functions71
▷ Named functions71100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants21100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/button-shortcodes.png1.12KB1.13KB0.00%
assets/img/button-shortcodes4.png1.18KB0.26KB▼ 78.18%