83% pearlcore-social-share

Code Review | Pearlcore Social Share

WordPress plugin Pearlcore Social Share scored83%from 54 tests.

About plugin

  • Plugin page: pearlcore-social-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.4
  • WordPress version: 6.3.1
  • First release: Nov 18, 2015
  • Latest release: Nov 23, 2015
  • Number of updates: 15
  • Update frequency: every 0.4 days
  • Top authors: owaiskiani (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /654 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
Installer ran successfully

Server metrics [RAM: ▼0.04MB] [CPU: ▼17.33ms] Passed 4 tests

A check of server-side resources used by Pearlcore Social Share
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2636.81 ▼4.22
Dashboard /wp-admin3.65 ▲0.3048.67 ▼15.67
Posts /wp-admin/edit.php3.70 ▲0.3449.11 ▲0.35
Add New Post /wp-admin/post-new.php4.88 ▼1.0145.63 ▼49.76
Media Library /wp-admin/upload.php3.51 ▲0.2841.47 ▲7.32

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 73 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Pearlcore Social Share
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲17613.63 ▼0.6511.79 ▲9.8654.87 ▲15.70
Dashboard /wp-admin2,204 ▲275.57 ▼0.0989.30 ▼8.7738.76 ▼4.52
Posts /wp-admin/edit.php2,112 ▲92.00 ▲0.0436.22 ▼4.5938.03 ▼1.83
Add New Post /wp-admin/post-new.php1,536 ▲1023.75 ▲0.17694.96 ▼10.6651.43 ▼10.01
Media Library /wp-admin/upload.php1,415 ▲154.21 ▼0.08101.01 ▼7.2351.22 ▲4.42

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

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)
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/pearlcore-social-share/includes/setting-framework/class-pcs-sanitization.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pearlcore-social-share/includes/class-pc-social-share-core.php:70

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 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Plugin configuration panel), #2 (An example of how the sharing appear in the front-end)
  • Plugin Name: Please specify the plugin name on the first line ( === pearlcore-social-share === )
The official readme.txt is a good inspiration

pearlcore-social-share/pc-social-share.php 92% from 13 tests

The principal PHP file in "Pearlcore Social Share" v. 1.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("pearlcore-social-share.php" instead of "pc-social-share.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected9,544 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
CSS744577,253
PHP163398521,452
SVG200580
JavaScript78686259

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity17.55
▷ Minimum class complexity1.00
▷ Maximum class complexity89.00
Average method complexity4.96
▷ Minimum method complexity1.00
▷ Maximum method complexity85.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods46
▷ Static methods715.22%
▷ Public methods3984.78%
▷ Protected methods00.00%
▷ Private methods715.22%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/theme-3.png4.51KB2.56KB▼ 43.14%
assets/images/theme-2.png3.12KB2.19KB▼ 29.63%
assets/images/ico-delete.png0.70KB0.72KB0.00%
assets/images/theme-1.png3.35KB2.40KB▼ 28.31%
assets/images/side-theme-2.png3.16KB2.37KB▼ 24.88%