62% speakstaff-player

Code Review | SpeakStaff Audio Player

WordPress plugin SpeakStaff Audio Player scored62%from 54 tests.

About plugin

  • Plugin page: speakstaff-player
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3
  • WordPress version: 6.3.1
  • First release: Oct 26, 2015
  • Latest release: Oct 28, 2015
  • Number of updates: 18
  • Update frequency: every 0.5 days
  • Top authors: planetshaker (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,540 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.91MB] [CPU: ▼35.13ms] Passed 4 tests

An overview of server-side resources used by SpeakStaff Audio Player
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0540.22 ▲6.44
Dashboard /wp-admin3.03 ▼0.2723.22 ▼25.46
Posts /wp-admin/edit.php3.03 ▼0.3223.38 ▼24.12
Add New Post /wp-admin/post-new.php3.03 ▼2.8522.00 ▼76.15
Media Library /wp-admin/upload.php3.03 ▼0.1922.14 ▼14.79
Speakstaff /wp-admin/options-general.php?page=speakstaff-player/pages/admin_menu.php3.0423.51

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by SpeakStaff Audio Player
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲6513.79 ▼0.852.17 ▲0.0343.45 ▲4.51
Dashboard /wp-admin2,237 ▲465.17 ▼0.72101.68 ▼0.0739.38 ▼1.40
Posts /wp-admin/edit.php2,119 ▲332.45 ▲0.4136.43 ▲1.6733.80 ▲0.12
Add New Post /wp-admin/post-new.php1,539 ▲223.56 ▲5.41676.52 ▲22.1736.97 ▼20.67
Media Library /wp-admin/upload.php1,413 ▲284.45 ▲0.14105.25 ▼6.6245.58 ▼2.65
Speakstaff /wp-admin/options-general.php?page=speakstaff-player/pages/admin_menu.php9382.3945.9428.01

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=speakstaff-player/pages/admin_menu.php
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 0% 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
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/speakstaff-player/meta/meta-box.php
    • > /wp-content/plugins/speakstaff-player/speakstaff-player.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/speakstaff-player/pages/admin_menu.php:5

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The new SpeakStaff Player Button.), #2 (This is the place where you paste your SpeakStaff Player ID. After you've selected a narrator and the spoken version of your text is finished, you'll receive the ID.), #3 (The output in the frontend of your blog.)
You can take inspiration from this readme.txt

speakstaff-player/speakstaff-player.php 92% from 13 tests

"SpeakStaff Audio Player" version 0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin540 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP34653291
PO File1357789
JavaScript361188
CSS21172

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions15
▷ Named functions15100.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
6 PNG files occupy 0.40MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png34.72KB14.42KB▼ 58.46%
screenshot-3.png269.94KB99.89KB▼ 62.99%
screenshot-2.png96.97KB36.44KB▼ 62.42%
assets/speakstaff-shortcode-icon-colored.png2.70KB1.74KB▼ 35.60%
assets/speakstaff-loader-logo.png3.74KB3.25KB▼ 13.17%