84% spreaker-shortcode

Code Review | Spreaker Shortcode

WordPress plugin Spreaker Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: spreaker-shortcode
  • Plugin version: 1.8.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5.0-6.1
  • WordPress version: 6.3.1
  • First release: Nov 23, 2011
  • Latest release: Jan 11, 2023
  • Number of updates: 94
  • Update frequency: every 43.3 days
  • Top authors: Spreaker (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

6,000+ active /79,882 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

This is a short check of server-side resources used by Spreaker Shortcode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.63 ▲2.79
Dashboard /wp-admin3.33 ▼0.0149.72 ▼9.99
Posts /wp-admin/edit.php3.38 ▲0.0344.40 ▼1.31
Add New Post /wp-admin/post-new.php5.91 ▲0.0381.42 ▼20.85
Media Library /wp-admin/upload.php3.25 ▲0.0233.51 ▼4.63

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Spreaker Shortcode
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.37 ▲0.021.83 ▲0.2043.45 ▲3.14
Dashboard /wp-admin2,195 ▲185.53 ▼0.1683.69 ▼2.1136.75 ▼4.67
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0334.30 ▼2.2331.38 ▼4.79
Add New Post /wp-admin/post-new.php1,526 ▼023.52 ▲0.37648.90 ▼25.1951.95 ▼5.06
Media Library /wp-admin/upload.php1,397 ▼64.17 ▼0.0495.83 ▼6.4939.04 ▼7.51

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger server errors 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

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: shortcode, audio, player, embed, sound...

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

"Spreaker Shortcode" version 1.8.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 285 characters long)
  • Main file name: Name the main plugin file 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
There were no executable 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

This is a short overview of cyclomatic complexity and code structure for this plugin
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%
Functions6
▷ Named functions6100.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