94% spreaker-shortcode

Code Review | Spreaker Shortcode

WordPress plugin Spreaker Shortcode scored 94% from 53 tests.

About plugin

  • Plugin page: spreaker-shortcode
  • Plugin version: 1.8.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5.0-5.6
  • WordPress version: 5.8.1
  • First release: Nov 23, 2011
  • Latest release: Jun 22, 2021
  • Number of updates: 92
  • Update frequency: every 38.0 days
  • Top authors: Spreaker (100%)

Code review

53 tests

User reviews

6 reviews

Install metrics

6,000+ active / 68,134 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼273.31ms] Passed 4 tests

A check of server-side resources used by Spreaker Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0233.03 ▼0.19
Dashboard /wp-admin3.08 ▲0.0344.85 ▼7.87
Posts /wp-admin/edit.php3.13 ▲0.0343.49 ▲6.86
Add New Post /wp-admin/post-new.php5.45 ▲0.0290.77 ▼1,077.66
Media Library /wp-admin/upload.php3.02 ▲0.0232.24 ▼7.51

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Spreaker Shortcode: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,650 ▲4416.15 ▲0.576.96 ▼1.4746.07 ▼3.32
Dashboard /wp-admin2,934 ▲815.90 ▲0.05140.87 ▼11.24105.44 ▲3.77
Posts /wp-admin/edit.php2,706 ▼02.69 ▲0.0065.50 ▲3.5992.13 ▲2.58
Add New Post /wp-admin/post-new.php1,481 ▲218.49 ▲0.33363.15 ▼4.24107.37 ▲1.84
Media Library /wp-admin/upload.php1,772 ▲35.04 ▲0.01147.54 ▼4.60109.95 ▼3.85

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller 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 everything seems fine, this is not 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 take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/spreaker-shortcode/spreaker_shortcode.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/spreaker-shortcode/trunk/spreaker_shortcode.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 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
9 plugin tags: player, embed, spreaker, shortcode, audio...

spreaker-shortcode/spreaker_shortcode.php 85% from 13 tests

Analyzing the main PHP file in "Spreaker Shortcode" version 1.8.0
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 285 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("spreaker-shortcode.php" instead of "spreaker_shortcode.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin248 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP12823141
PO File2222260
JavaScript14034
JSON10013

PHP code Passed 2 tests

A short review 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.78
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected