84% share-blog-post-with-social-network

Code Review | Share Blog Post With Social Network

WordPress plugin Share Blog Post With Social Network scored 84% from 54 tests.

About plugin

  • Plugin page: share-blog-post-w...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 1, 2020
  • Latest release: Sep 1, 2020
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: rpopli (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 360 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
Install script ran successfully

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

Analyzing server-side resources used by Share Blog Post With Social Network
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.63 ▼7.50
Dashboard /wp-admin3.31 ▲0.0148.39 ▼0.23
Posts /wp-admin/edit.php3.36 ▲0.0149.39 ▼13.96
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.93 ▼16.91
Media Library /wp-admin/upload.php3.24 ▲0.0135.02 ▼2.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: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Share Blog Post With Social Network
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,868 ▲13314.81 ▲0.258.17 ▲6.0839.78 ▲1.09
Dashboard /wp-admin2,225 ▲406.06 ▲1.16120.46 ▲11.4643.42 ▼9.60
Posts /wp-admin/edit.php2,114 ▲222.68 ▲0.6746.96 ▼3.7335.32 ▼11.23
Add New Post /wp-admin/post-new.php1,564 ▲5025.09 ▲7.64734.00 ▲16.8861.16 ▲4.52
Media Library /wp-admin/upload.php1,416 ▲255.17 ▲0.92104.85 ▼3.8241.63 ▼4.82

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/share-blog-post-with-social-network/includes/display-functions.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: blog, share, wordpress, facebook

share-blog-post-with-social-network/share-blog-post-with-social-network.php 92% from 13 tests

The main PHP script in "Share Blog Post With Social Network" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes

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
Good job! No executable or dangerous file extensions detected76 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3221643
CSS19633

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions3
▷ Named functions3100.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 files were detected