78% sharpay

Code Review | Sharpay

WordPress plugin Sharpay scored 78% from 54 tests.

About plugin

  • Plugin page: sharpay
  • Plugin version: 1.9.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.5
  • WordPress version: 6.3.1
  • First release: Apr 29, 2018
  • Latest release: Sep 2, 2020
  • Number of updates: 29
  • Update frequency: every 29.6 days
  • Top authors: sharpay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,833 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼2.24ms] Passed 4 tests

Analyzing server-side resources used by Sharpay
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0644.98 ▲2.36
Dashboard /wp-admin3.41 ▲0.1149.09 ▼2.61
Posts /wp-admin/edit.php3.52 ▲0.1747.17 ▲0.80
Add New Post /wp-admin/post-new.php6.01 ▲0.1284.56 ▼9.51
Media Library /wp-admin/upload.php3.33 ▲0.1036.56 ▲4.28
Sharpay /wp-admin/options-general.php?page=sharpay-settings3.3034.04

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_sharpay_widget
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Sharpay: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7313.26 ▼1.104.79 ▲3.0542.51 ▼3.42
Dashboard /wp-admin2,217 ▲284.90 ▼0.0599.85 ▼20.5339.32 ▼5.86
Posts /wp-admin/edit.php2,097 ▲112.04 ▲0.0835.89 ▼1.5731.93 ▼1.87
Add New Post /wp-admin/post-new.php1,521 ▼1823.59 ▲0.09661.72 ▲8.3850.17 ▲0.42
Media Library /wp-admin/upload.php1,396 ▲54.24 ▲0.0294.88 ▼1.2939.71 ▼0.96
Sharpay /wp-admin/options-general.php?page=sharpay-settings2,2484.5084.0126.73

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 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_sharpay_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/sharpay/sharpay.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sharpay/includes/sharpay-admin.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sharpay/includes/sharpay-public.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/sharpay/includes/class-sharpay-widget.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=sharpay-settings
    • > Other (severe) in unknown
    chrome-error://chromewebdata/ - Refused to display 'https://app.sharpay.io/' in a frame because it set 'X-Frame-Options' to 'deny'.

Optimizations

Plugin configuration 90% 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:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === sharpay === )
The official readme.txt might help

sharpay/sharpay.php 85% from 13 tests

Analyzing the main PHP file in "Sharpay" version 1.9.2
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Please keep the plugin description shorter than 140 characters (currently 202 characters long)

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 plugin828 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP515874540
PO File13838118
JavaScript1191398
CSS1231469
Markdown2103

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected