84% ak-sharing-buttons

Code Review | AK Sharing Buttons

WordPress plugin AK Sharing Buttons scored84%from 54 tests.

About plugin

  • Plugin page: ak-sharing-buttons
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.3
  • WordPress version: 6.3.1
  • First release: Jun 19, 2015
  • Latest release: Sep 6, 2015
  • Number of updates: 24
  • Update frequency: every 3.3 days
  • Top authors: colourstheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,280 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
Installer ran successfully

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

Analyzing server-side resources used by AK Sharing Buttons
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0233.73 ▼8.22
Dashboard /wp-admin3.32 ▼0.0345.46 ▼17.75
Posts /wp-admin/edit.php3.37 ▲0.0144.66 ▲4.76
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.64 ▼23.94
Media Library /wp-admin/upload.php3.24 ▲0.0136.85 ▲2.69

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

AK Sharing Buttons: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲14213.61 ▼0.768.31 ▲6.4939.34 ▼4.90
Dashboard /wp-admin2,209 ▲245.88 ▲0.0298.85 ▼2.3639.12 ▼1.51
Posts /wp-admin/edit.php2,086 ▼31.99 ▼0.0439.05 ▼1.3234.84 ▼1.42
Add New Post /wp-admin/post-new.php1,533 ▲1623.42 ▲5.66654.88 ▲33.4851.67 ▲1.19
Media Library /wp-admin/upload.php1,388 ▲64.22 ▼0.02107.16 ▲9.5046.37 ▲2.96

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/ak-sharing-buttons/ak-sharing-buttons.php:22

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 Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: linkedin, share, facebook, share buttons, google...

ak-sharing-buttons/ak-sharing-buttons.php Passed 13 tests

The main file in "AK Sharing Buttons" v. 1.0.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
130 characters long description:
Ajax load and append a list of sharing button to single-post, static-page. Ex: facebook, twitter, pinterst, google-plus, linkedin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected718 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP15547297
Sass1230175
CSS2130161
JavaScript23036
CoffeeScript18027
SVG10022

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.16
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods213.33%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin