84% css-share-buttons

Code Review | CSS Share Buttons

WordPress plugin CSS Share Buttons scored84%from 54 tests.

About plugin

  • Plugin page: css-share-buttons
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5
  • WordPress version: 6.3.1
  • First release: Nov 21, 2014
  • Latest release: Apr 28, 2016
  • Number of updates: 16
  • Update frequency: every 32.8 days
  • Top authors: purab (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,968 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼9.73ms] Passed 4 tests

This is a short check of server-side resources used by CSS Share Buttons
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.18 ▲2.17
Dashboard /wp-admin3.33 ▼0.0151.18 ▼11.71
Posts /wp-admin/edit.php3.38 ▲0.0345.96 ▼2.34
Add New Post /wp-admin/post-new.php5.91 ▲0.0384.40 ▼26.51
Media Library /wp-admin/upload.php3.25 ▲0.0334.74 ▲1.65
CSS menu Settings /wp-admin/admin.php?page=css-share-tool3.2230.22

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for CSS Share Buttons
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲5014.21 ▼0.391.91 ▲0.2344.70 ▲3.59
Dashboard /wp-admin2,208 ▲315.53 ▲0.0082.28 ▼3.2236.74 ▼5.55
Posts /wp-admin/edit.php2,116 ▲161.94 ▼0.0833.26 ▼9.8534.46 ▼4.89
Add New Post /wp-admin/post-new.php1,539 ▲222.92 ▲4.61655.45 ▲24.0959.26 ▼5.04
Media Library /wp-admin/upload.php1,416 ▲164.14 ▲0.0095.41 ▼2.7140.32 ▼1.88
CSS menu Settings /wp-admin/admin.php?page=css-share-tool8441.9926.0430.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

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)
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/css-share-buttons/csssharebuttons.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: twitter, google plus, share buttons, button, linkedin...

css-share-buttons/csssharebuttons.php 85% from 13 tests

This is the main PHP file of "CSS Share Buttons" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 230 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("css-share-buttons.php" instead of "csssharebuttons.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected199 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS2199110
PHP1183089

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
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%
Functions5
▷ Named functions5100.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
No PNG images were found in this plugin