10% simple-discography

Code Review | Simple Discography

WordPress plugin Simple Discography scored10%from 54 tests.

About plugin

  • Plugin page: simple-discography
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2
  • WordPress version: 6.3.1
  • First release: Aug 9, 2014
  • Latest release: May 30, 2015
  • Number of updates: 37
  • Update frequency: every 8.0 days
  • Top authors: lermit4 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /4,628 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/simple-discography/SiDi_Discography_Widget.php+19
    Methods with the same name as their class will not be constructors in a future version of PHP; SiDi_Discography_Widget has a deprecated constructor

Server metrics [RAM: ▼1.89MB] [CPU: ▼60.90ms] Passed 4 tests

This is a short check of server-side resources used by Simple Discography
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.15 ▼1.355.26 ▼38.36
Dashboard /wp-admin2.17 ▼1.216.94 ▼64.39
Posts /wp-admin/edit.php2.17 ▼1.227.02 ▼44.99
Add New Post /wp-admin/post-new.php2.17 ▼3.766.10 ▼95.87
Media Library /wp-admin/upload.php2.17 ▼1.105.44 ▼31.32
All Album /wp-admin/edit.php?post_type=discography2.176.53
Add New /wp-admin/post-new.php?post_type=discography2.179.54
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=discography2.187.47
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=discography2.185.89

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 45 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_sidi_dw
category_children
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Simple Discography
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲16613.49 ▼0.928.82 ▲7.1344.63 ▲0.75
Dashboard /wp-admin2,235 ▲585.64 ▼0.0398.12 ▼1.8642.58 ▼3.74
Posts /wp-admin/edit.php2,137 ▲372.02 ▲0.0434.10 ▼3.3735.46 ▼1.68
Add New Post /wp-admin/post-new.php1,557 ▲3122.99 ▼0.19647.53 ▼75.2148.53 ▼3.26
Media Library /wp-admin/upload.php1,434 ▲344.32 ▲0.12105.32 ▲2.2846.10 ▼2.61
All Album /wp-admin/edit.php?post_type=discography1,1551.9530.3534.84
Add New /wp-admin/post-new.php?post_type=discography2,6108.26203.1770.78
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=discography1,3562.2926.5829.00
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=discography1,4892.3028.2834.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/simple-discography/SiDi_Discography_Widget.php+19
    Methods with the same name as their class will not be constructors in a future version of PHP; SiDi_Discography_Widget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_sidi_dw
    • category_children

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=category&post_type=discography
    • > Deprecated in wp-content/plugins/simple-discography/SiDi_Discography_Widget.php+19
    Methods with the same name as their class will not be constructors in a future version of PHP; SiDi_Discography_Widget has a deprecated constructor
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=category&post_type=discography
    • > Deprecated in wp-content/plugins/simple-discography/classes/SiDi_Widget_Form.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; SiDi_Widget_Form has a deprecated constructor
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=category&post_type=discography
    • > Deprecated in wp-content/plugins/simple-discography/classes/SiDi_General_Form.php+9
    Methods with the same name as their class will not be constructors in a future version of PHP; SiDi_General_From has a deprecated constructor
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=category&post_type=discography
    • > Deprecated in wp-content/plugins/simple-discography/classes/SiDi_Generat_Form.php+8
    Methods with the same name as their class will not be constructors in a future version of PHP; SiDi_Generat_Form has a deprecated constructor
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=category&post_type=discography
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in SiDi_Discography_Widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/post-new.php?post_type=discography
    • > Notice in wp-content/plugins/simple-discography/classes/SiDi_Generat_Form.php+223
    A non well formed numeric value encountered

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
Please fix the following items
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-discography/SiDi_Posts.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-discography/SiDi_Shortcodes.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-discography/simple-discography.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/simple-discography/SiDi_content.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-discography/classes/SiDi_Widget_Form.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-discography/SiDi_Discography_Widget.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
Please take inspiration from this readme.txt

simple-discography/simple-discography.php Passed 13 tests

"Simple Discography" version 1.3.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
112 characters long description:
Simple Discography is a small plugin to very easy to use that will allow you to manage the albums of your band.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected4,989 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript62553642,014
CSS440601,406
PHP91162831,173
PO File3204243396

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity27.60
▷ Minimum class complexity13.00
▷ Maximum class complexity51.00
Average method complexity4.41
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods39
▷ Static methods512.82%
▷ Public methods3692.31%
▷ Protected methods37.69%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
17 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/css/images/ui-bg_glass_75_d0e5f5_1x400.png0.33KB0.16KB▼ 52.38%
includes/css/images/ui-bg_glass_85_dfeffc_1x400.png0.33KB0.16KB▼ 53.08%
includes/css/images/ui-bg_glass_95_fef1ec_1x400.png0.32KB0.15KB▼ 54.82%
includes/css/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
includes/css/images/ui-icons_469bdd_256x240.png4.44KB4.17KB▼ 6.02%