84% mt8-post-share

Code Review | Simple Post Share

WordPress plugin Simple Post Share scored84%from 54 tests.

About plugin

  • Plugin page: mt8-post-share
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.2
  • WordPress version: 6.3.1
  • First release: Jul 25, 2015
  • Latest release: Apr 6, 2023
  • Number of updates: 7
  • Update frequency: every 401.7 days
  • Top authors: mt8.biz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,562 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Simple Post Share
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.41 ▼0.40
Dashboard /wp-admin3.33 ▲0.0245.08 ▼0.51
Posts /wp-admin/edit.php3.38 ▲0.0245.23 ▼0.36
Add New Post /wp-admin/post-new.php5.86 ▼0.0381.12 ▼13.35
Media Library /wp-admin/upload.php3.25 ▲0.0237.26 ▲2.76

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Simple Post Share
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.25 ▼0.131.58 ▼0.0039.38 ▼0.46
Dashboard /wp-admin2,189 ▲125.55 ▼0.1683.71 ▼5.2437.25 ▼1.31
Posts /wp-admin/edit.php2,103 ▲32.01 ▲0.0739.04 ▲3.6136.08 ▼3.51
Add New Post /wp-admin/post-new.php6,399 ▲4,87327.36 ▲4.29913.72 ▲252.1962.40 ▲7.69
Media Library /wp-admin/upload.php1,397 ▼34.19 ▲0.0095.71 ▼3.6644.03 ▲2.99

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mt8-post-share/mt8-post-share.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Latest information) image required
The official readme.txt is a good inspiration

mt8-post-share/mt8-post-share.php Passed 13 tests

The main PHP file in "Simple Post Share" ver. 2.0.0 adds more information about the plugin and also serves as the entry point for this plugin
33 characters long description:
Show SNS button on the post page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin146 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1321069
JavaScript15030
PO File181328
CSS14019

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.27
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods763.64%
▷ Protected methods00.00%
▷ Private methods436.36%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
PNG images were not found in this plugin