83% ctc-social-sharing

Code Review | CTC Social Sharing

WordPress plugin CTC Social Sharing scored83%from 54 tests.

About plugin

  • Plugin page: ctc-social-sharing
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Jun 2, 2021
  • Latest release: Jul 3, 2023
  • Number of updates: 5
  • Update frequency: every 152.2 days
  • Top authors: ujw0l (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,317 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: ▼7.63ms] Passed 4 tests

Analyzing server-side resources used by CTC Social Sharing
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.86 ▼3.89
Dashboard /wp-admin3.31 ▲0.0143.83 ▼0.01
Posts /wp-admin/edit.php3.36 ▲0.0143.90 ▼5.56
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.76 ▼19.83
Media Library /wp-admin/upload.php3.23 ▲0.0136.10 ▼1.24

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

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

Browser metrics Passed 4 tests

CTC Social Sharing: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9213.27 ▼0.995.13 ▲3.1038.55 ▼12.65
Dashboard /wp-admin2,206 ▲215.91 ▲0.10105.59 ▲6.1339.58 ▼3.10
Posts /wp-admin/edit.php2,086 ▼32.02 ▼0.0237.01 ▼3.7633.23 ▼8.71
Add New Post /wp-admin/post-new.php1,684 ▲14222.17 ▲4.00617.76 ▲3.0856.91 ▼2.16
Media Library /wp-admin/upload.php1,388 ▲34.28 ▲0.1296.07 ▼7.8541.93 ▼1.17

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ctc-social-sharing/ctc-social-sharing.php:41

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 86% 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
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Gutenberg Block), #2 (Block Setting), #3 (Frontend display)
You can look at the official readme.txt

ctc-social-sharing/ctc-social-sharing.php 77% from 13 tests

"CTC Social Sharing" version 2.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("5.7.2" instead of "6.1")
  • Git Repository: An alternative Git repository was detected
  • Requires PHP: The required version number must match the one declared in readme.txt ("7.4.9" instead of "7.0")

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
There were no executable files found in this plugin17,376 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JSON40016,072
Sass228101,146
JavaScript47476141
PHP262115
CSS2002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.26MB with 0.19MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png112.29KB27.38KB▼ 75.62%
screenshot-2.png131.89KB30.51KB▼ 76.86%
screenshot-3.png21.40KB6.01KB▼ 71.91%