83% f13-lastfm-album-shortcode

Code Review | F13 Last.fm album Shortcode

WordPress plugin F13 Last.fm album Shortcode scored83%from 54 tests.

About plugin

  • Plugin page: f13-lastfm-album-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.8
  • WordPress version: 6.3.1
  • First release: Jul 21, 2016
  • Latest release: Sep 15, 2018
  • Number of updates: 4
  • Update frequency: every 196.5 days
  • Top authors: f13dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /911 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼8.39ms] Passed 4 tests

Analyzing server-side resources used by F13 Last.fm album Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.40 ▼0.98
Dashboard /wp-admin3.31 ▼0.0351.33 ▼15.86
Posts /wp-admin/edit.php3.36 ▲0.0150.10 ▼2.21
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.57 ▼14.52
Media Library /wp-admin/upload.php3.23 ▲0.0139.79 ▲1.97
F13 Last.fm Album Shortcode /wp-admin/options-general.php?page=f13-lastfm-album-shortcode3.2033.57

Server storage [IO: ▲0.66MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for F13 Last.fm album Shortcode
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲2414.37 ▼0.271.83 ▼0.4446.70 ▲3.10
Dashboard /wp-admin2,202 ▲255.65 ▲0.0693.13 ▲2.0836.29 ▼10.99
Posts /wp-admin/edit.php2,101 ▼22.00 ▼0.0439.72 ▼1.2535.30 ▼4.69
Add New Post /wp-admin/post-new.php1,529 ▼323.72 ▲0.92683.56 ▲57.0060.27 ▼3.49
Media Library /wp-admin/upload.php1,404 ▲44.30 ▲0.10104.76 ▲1.4946.14 ▲0.03
F13 Last.fm Album Shortcode /wp-admin/options-general.php?page=f13-lastfm-album-shortcode8782.0423.5528.33

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% 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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× 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/f13-lastfm-album-shortcode/wp-last.fm-album-shortcode.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === f13-lastfm-album-shortcode === )
  • Screenshots: Screenshot #1 (An example showing the results of the shortcode [album artist="Queen" album="Greatest Hits"]) image missing
You can look at the official readme.txt

f13-lastfm-album-shortcode/wp-last.fm-album-shortcode.php 92% from 13 tests

The main PHP file in "F13 Last.fm album Shortcode" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("f13-lastfm-album-shortcode.php" instead of "wp-last.fm-album-shortcode.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin340 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP151124235
CSS112070
Markdown112035

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.61MB with 0.41MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png621.12KB204.30KB▼ 67.11%