68% apsense-share-button

Code Review | Share Button for APSense Business Network

WordPress plugin Share Button for APSense Business Network scored68%from 54 tests.

About plugin

  • Plugin page: apsense-share-button
  • Plugin version: 3.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.5
  • WordPress version: 6.3.1
  • First release: Jan 7, 2013
  • Latest release: Jan 15, 2013
  • Number of updates: 15
  • Update frequency: every 0.6 days
  • Top authors: apsense (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /2,920 total downloads

Benchmarks

Plugin footprint 65% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.96MB] [CPU: ▼38.55ms] Passed 4 tests

A check of server-side resources used by Share Button for APSense Business Network
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.08 ▼1.77
Dashboard /wp-admin3.00 ▼0.3522.04 ▼38.42
Posts /wp-admin/edit.php3.00 ▼0.3625.03 ▼24.31
Add New Post /wp-admin/post-new.php3.00 ▼2.8922.66 ▼76.89
Media Library /wp-admin/upload.php3.00 ▼0.2323.15 ▼14.58
/wp-admin/options-general.php?page=apsense-share-button/apsense-share-button.php3.0022.50

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Share Button for APSense Business Network
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲4614.35 ▼0.001.62 ▼0.0038.89 ▼1.84
Dashboard /wp-admin2,201 ▲235.65 ▼0.0683.94 ▼23.8243.45 ▲1.27
Posts /wp-admin/edit.php2,106 ▲32.00 ▲0.0243.25 ▲3.0142.77 ▲6.54
Add New Post /wp-admin/post-new.php1,536 ▲1018.51 ▼4.79637.23 ▼16.5868.33 ▲17.57
Media Library /wp-admin/upload.php1,403 ▲34.15 ▼0.1596.11 ▼3.9440.77 ▲1.44
/wp-admin/options-general.php?page=apsense-share-button/apsense-share-button.php8842.0623.9627.18

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
  • The plugin did not uninstall gracefully
    • > 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
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=apsense-share-button/apsense-share-button.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.)
    • > GET request to /wp-admin/options-general.php?page=apsense-share-button/apsense-share-button.php
    • > Notice in wp-content/plugins/apsense-share-button/apsense-share-button.php+71
    Undefined index: button_type

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/apsense-share-button/apsense-share-button.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: share button, social share button, apsense

apsense-share-button/apsense-share-button.php 77% from 13 tests

"Share Button for APSense Business Network" version 3.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Description: Keep the plugin description shorter than 140 characters (currently 160 characters long)
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected205 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15319205

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin