84% social-share-by-asphalt-themes

Code Review | Simple Social Share by Asphalt Themes

WordPress plugin Simple Social Share by Asphalt Themes scored 84% from 54 tests.

About plugin

  • Plugin page: social-share-by-a...
  • Plugin version: 0.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0.2
  • WordPress version: 6.3.1
  • First release: Nov 5, 2017
  • Latest release: Dec 24, 2018
  • Number of updates: 6
  • Update frequency: every 69.7 days
  • Top authors: asphaltthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 860 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼0.48ms] Passed 4 tests

A check of server-side resources used by Simple Social Share by Asphalt Themes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.67 ▲2.07
Dashboard /wp-admin3.33 ▲0.0347.03 ▼1.30
Posts /wp-admin/edit.php3.38 ▲0.0347.55 ▼0.71
Add New Post /wp-admin/post-new.php5.92 ▲0.0394.26 ▲2.05
Media Library /wp-admin/upload.php3.26 ▲0.0333.97 ▼1.96
Social Share /wp-admin/options-general.php?page=social-share3.2234.02

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Simple Social Share by Asphalt Themes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.25 ▼1.371.79 ▼0.2138.39 ▼14.70
Dashboard /wp-admin2,210 ▲225.86 ▲0.7595.83 ▼20.7039.48 ▼7.34
Posts /wp-admin/edit.php2,093 ▲41.98 ▼0.0736.21 ▲0.2236.86 ▲2.07
Add New Post /wp-admin/post-new.php1,517 ▼1617.83 ▼5.49634.83 ▼44.6756.94 ▲2.49
Media Library /wp-admin/upload.php1,395 ▲74.18 ▼0.01100.21 ▼6.3443.58 ▼1.14
Social Share /wp-admin/options-general.php?page=social-share8042.1823.8023.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
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 add_action() in wp-content/plugins/social-share-by-asphalt-themes/social-share.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Plugin settings), #2 (Social handle screenshot)
You can take inspiration from this readme.txt

social-share-by-asphalt-themes/social-share.php 92% from 13 tests

The entry point to "Simple Social Share by Asphalt Themes" version 0.0.4 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("social-share-by-asphalt-themes.php" instead of "social-share.php")

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 detected171 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13710102
CSS1171869

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions10
▷ Named functions10100.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
No PNG images were found in this plugin