84% ah-social-share

Code Review | AH Social share

WordPress plugin AH Social share scored84%from 54 tests.

About plugin

  • Plugin page: ah-social-share
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.1
  • WordPress version: 6.3.1
  • First release: Sep 22, 2015
  • Latest release: Nov 27, 2015
  • Number of updates: 9
  • Update frequency: every 7.3 days
  • Top authors: sendmail2krrish (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,184 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.69MB] [CPU: ▼17.63ms] Passed 4 tests

An overview of server-side resources used by AH Social share
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.62 ▲2.87
Dashboard /wp-admin3.32 ▼0.0246.00 ▼11.58
Posts /wp-admin/edit.php3.37 ▲0.0243.34 ▼1.24
Add New Post /wp-admin/post-new.php3.11 ▼2.7834.07 ▼59.02
Media Library /wp-admin/upload.php3.24 ▲0.0234.72 ▲1.32

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

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

Browser metrics Passed 4 tests

AH Social share: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.30 ▼1.241.86 ▲0.1641.83 ▼0.18
Dashboard /wp-admin2,209 ▲214.86 ▼0.21105.54 ▲6.7341.70 ▼3.56
Posts /wp-admin/edit.php2,086 ▼32.02 ▼0.0333.29 ▼3.6835.40 ▼0.47
Add New Post /wp-admin/post-new.php6,244 ▲4,73018.95 ▲1.48932.54 ▲249.8164.53 ▲4.33
Media Library /wp-admin/upload.php1,391 ▲64.17 ▼0.05102.93 ▲2.2547.63 ▲2.17

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ah-social-share/ah-social-share.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Screenshot #1 (After install.) image not found
You can look at the official readme.txt

ah-social-share/ah-social-share.php 92% from 13 tests

The main PHP file in "AH Social share" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 275 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected83 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1102071
CSS10012

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.40
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/facebook.png2.16KB1.46KB▼ 32.29%
images/linkedin.png2.04KB1.40KB▼ 31.52%
screenshot-1.png27.74KB4.51KB▼ 83.75%
images/google+.png2.29KB1.44KB▼ 36.96%
images/twitter.png1.95KB1.23KB▼ 37.12%