84% easy-social-shares

Code Review | Easy Social Shares

WordPress plugin Easy Social Shares scored 84% from 54 tests.

About plugin

  • Plugin page: easy-social-shares
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4
  • WordPress version: 6.3.1
  • First release: May 5, 2020
  • Latest release: May 5, 2020
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: Mahesh901122 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 470 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.00MB] [CPU: ▼5.12ms] Passed 4 tests

An overview of server-side resources used by Easy Social Shares
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.92 ▼6.31
Dashboard /wp-admin3.31 ▲0.0144.34 ▼4.54
Posts /wp-admin/edit.php3.36 ▲0.0045.55 ▲0.89
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.39 ▼9.70
Media Library /wp-admin/upload.php3.23 ▲0.0033.36 ▲0.07

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Easy Social Shares
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6714.74 ▲0.361.62 ▲0.0338.10 ▼2.95
Dashboard /wp-admin2,206 ▲144.80 ▼0.21108.83 ▲4.2638.62 ▼7.77
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0138.87 ▲3.6933.78 ▼0.87
Add New Post /wp-admin/post-new.php1,533 ▼023.33 ▲0.14657.56 ▲7.9853.64 ▼0.04
Media Library /wp-admin/upload.php1,385 ▼04.18 ▼0.0398.96 ▲1.3342.47 ▼3.15

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 were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/easy-social-shares/classes/class-easy-social-shares.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/easy-social-shares/easy-social-shares.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues 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
4 plugin tags: social-shares, social-share, facebook, twitter

easy-social-shares/easy-social-shares.php Passed 13 tests

The principal PHP file in "Easy Social Shares" v. 1.0.0 is loaded by WordPress automatically on each request
70 characters long description:
Zero configuration. Simply use shortcode <[easy_social_shares]>.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin173 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP21873108
SVG20143
CSS11022

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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