84% posts-social-shares-count

Code Review | Posts Social Shares Count

WordPress plugin Posts Social Shares Count scored84%from 54 tests.

About plugin

  • Plugin page: posts-social-shar...
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5.0-4.3
  • WordPress version: 6.3.1
  • First release: Sep 6, 2014
  • Latest release: Nov 24, 2015
  • Number of updates: 31
  • Update frequency: every 14.3 days
  • Top authors: Bishoy.A (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

800+ active /6,514 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.31ms] Passed 4 tests

Analyzing server-side resources used by Posts Social Shares Count
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0537.95 ▼0.52
Dashboard /wp-admin3.35 ▲0.0044.59 ▼14.93
Posts /wp-admin/edit.php3.37 ▲0.01582.30 ▲538.53
Add New Post /wp-admin/post-new.php5.93 ▲0.0490.98 ▼0.18
Media Library /wp-admin/upload.php3.27 ▲0.0434.85 ▼1.60

Server storage [IO: ▲0.02MB] [DB: ▲0.07MB] 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
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Posts Social Shares Count
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.22 ▼0.141.68 ▲0.0438.72 ▲1.23
Dashboard /wp-admin2,198 ▲185.53 ▼0.1186.09 ▼3.0638.94 ▼3.59
Posts /wp-admin/edit.php2,110 ▲131.99 ▼0.0133.46 ▼0.1033.11 ▼7.01
Add New Post /wp-admin/post-new.php1,528 ▲223.12 ▲0.12640.24 ▼51.6648.47 ▼5.37
Media Library /wp-admin/upload.php1,397 ▼34.11 ▼0.01100.00 ▼13.7941.87 ▼6.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

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)
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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/posts-social-shares-count/posts-share-count.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: google plus, shortcodes, social, pinterest, count...

posts-social-shares-count/posts-share-count.php 85% from 13 tests

The principal PHP file in "Posts Social Shares Count" v. 1.4.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("posts-social-shares-count.php" instead of "posts-share-count.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 236 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin227 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP379180227

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity11.50
▷ Minimum class complexity10.00
▷ Maximum class complexity13.00
Average method complexity1.78
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods27
▷ Static methods13.70%
▷ Public methods2592.59%
▷ Protected methods00.00%
▷ Private methods27.41%
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

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin