78% user-post-on-social-network

Code Review | User Post On Social Network

WordPress plugin User Post On Social Network scored78%from 54 tests.

About plugin

  • Plugin page: user-post-on-soci...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.9.2
  • WordPress version: 6.3.1
  • First release: Sep 5, 2014
  • Latest release: Nov 2, 2014
  • Number of updates: 5
  • Update frequency: every 11.8 days
  • Top authors: sajid.sayyad09@gmail.com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /980 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼10.24ms] Passed 4 tests

Server-side resources used by User Post On Social Network
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.82 ▼5.26
Dashboard /wp-admin3.40 ▲0.0649.82 ▼13.91
Posts /wp-admin/edit.php3.44 ▲0.0848.63 ▲1.45
Add New Post /wp-admin/post-new.php6.08 ▲0.1979.94 ▼14.00
Media Library /wp-admin/upload.php3.34 ▲0.1133.31 ▼7.77
User Post On Social Network /wp-admin/options-general.php?page=user-post-social-network3.2431.48

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for User Post On Social Network
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲13513.52 ▼1.099.61 ▲7.6941.43 ▼3.63
Dashboard /wp-admin2,199 ▲195.57 ▼0.1194.12 ▼3.5741.40 ▼1.59
Posts /wp-admin/edit.php2,086 ▼112.03 ▲0.0734.49 ▼2.1537.58 ▲3.91
Add New Post /wp-admin/post-new.php1,534 ▲823.17 ▲0.12637.69 ▼19.3659.86 ▼0.08
Media Library /wp-admin/upload.php1,398 ▼54.19 ▼0.09100.98 ▲0.2444.50 ▲2.17
User Post On Social Network /wp-admin/options-general.php?page=user-post-social-network8212.0024.5729.28

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=user-post-social-network
    • > Notice in wp-content/plugins/user-post-on-social-network/user-post-social-network.php+80
    Undefined offset: 1

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
  • 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/user-post-on-social-network/user-post-social-network.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: facebook, wordpress post on facebook, wordpress

user-post-on-social-network/user-post-social-network.php 92% from 13 tests

Analyzing the main PHP file in "User Post On Social Network" version 1.0
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("user-post-on-social-network.php" instead of "user-post-social-network.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,204 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2136109951
PHP23537227
CSS10026

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin