72% accesspress-social-share

Code Review | AccessPress Social Share

WordPress plugin AccessPress Social Share scored 72% from 54 tests.

About plugin

  • Plugin page: accesspress-socia...
  • Plugin version: 4.5.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.8
  • WordPress version: 5.9.2
  • First release: Jan 26, 2015
  • Latest release: Nov 24, 2021
  • Number of updates: 127
  • Update frequency: every 19.6 days
  • Top authors: Access Keys (100%)

Code review

54 tests

User reviews

37 reviews

Install metrics

30,000+ active / 1,463,156 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by AccessPress Social Share
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1053.37 ▲1.52
Dashboard /wp-admin3.46 ▲0.0532.21 ▼0.80
Posts /wp-admin/edit.php3.68 ▲0.0438.22 ▼2.50
Add New Post /wp-admin/post-new.php7.01 ▲0.05975.47 ▼317.99
Media Library /wp-admin/upload.php3.33 ▲0.0425.45 ▼3.84
Documentation /wp-admin/admin.php?page=apss-documentation3.1417.74
Check Premium Version /wp-admin/admin.php?page=apss-premium3.1418.54
AccessPress Social Share /wp-admin/admin.php?page=accesspress-social-share3.5032.90

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 78 new files
Database: no new tables, 2 new options
New WordPress options
apss_social_counts_transients
apss_share_settings

Browser metrics Passed 4 tests

Checking browser requirements for AccessPress Social Share
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,952 ▲19916.50 ▲0.8811.06 ▲5.072.75 ▲0.17
Dashboard /wp-admin2,931 ▲706.05 ▼0.12116.92 ▼17.44176.66 ▲14.46
Posts /wp-admin/edit.php2,728 ▲373.11 ▼0.1360.82 ▼8.44144.72 ▼4.62
Add New Post /wp-admin/post-new.php1,722 ▲6117.71 ▲1.62394.13 ▼18.35207.68 ▲55.91
Media Library /wp-admin/upload.php1,734 ▲395.58 ▲0.05128.60 ▼13.28213.27 ▲24.48
Documentation /wp-admin/admin.php?page=apss-documentation1,3918.82327.98246.23
Check Premium Version /wp-admin/admin.php?page=apss-premium3,57819.20625.76224.25
AccessPress Social Share /wp-admin/admin.php?page=accesspress-social-share3,77517.34423.16182.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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 2 options
    • apss_share_settings
    • apss_social_counts_transients

Smoke tests 25% 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 everything seems fine, this is not an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 9× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/accesspress-social-share/accesspress-social-share.php
    • > /wp-content/plugins/accesspress-social-share/inc/frontend/content-filter.php
    • > /wp-content/plugins/accesspress-social-share/inc/backend/save-settings.php
    • > /wp-content/plugins/accesspress-social-share/inc/backend/activation.php
    • > /wp-content/plugins/accesspress-social-share/inc/backend/about-apss.php
    • > /wp-content/plugins/accesspress-social-share/inc/frontend/count_shortcode.php
    • > /wp-content/plugins/accesspress-social-share/inc/backend/main-page.php
    • > /wp-content/plugins/accesspress-social-share/inc/backend/how-to-use.php
    • > /wp-content/plugins/accesspress-social-share/inc/frontend/shortcode.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/accesspress-social-share/inc/backend/save-button.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/accesspress-social-share/inc/frontend/font-awesome-version.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=apss-documentation
    • > Javascript (severe) in unknown
    https://accesspressthemes.com/documentation/accesspress-social-share/ - Access to script at 'https://embed.tawk.to/60cc2bbb65b7290ac63693ec/1f8eollms' from origin 'https://accesspressthemes.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=apss-premium
    • > Network (severe)
    https://embed.tawk.to/60cc2bbb65b7290ac63693ec/1f8eollms - Failed to load resource: net::ERR_FAILED
    • > GET request to /wp-admin/admin.php?page=apss-premium
    • > Security (warning) in unknown
    https://accesspressthemes.com/wordpress-plugins/accesspress-social-pro/ 0 Mixed Content: The page at 'https://accesspressthemes.com/wordpress-plugins/accesspress-social-pro/' was loaded over HTTPS, but requested an insecure element 'http://demo.accesspressthemes.com/wordpress-plugins/accesspress-social-pro/wp-content/uploads/2019/07/accesspress-social-pro-salespage.jpg'. This request was automatically upgraded to HTTPS, For more information see https://blog.chromium.org/2019/10/no-more-mixed-messages-about-https.html
    • > GET request to /wp-admin/admin.php?page=apss-premium
    • > Security (warning) in unknown
    https://accesspressthemes.com/wordpress-plugins/accesspress-social-pro/ 1164 Mixed Content: The page at 'https://accesspressthemes.com/wordpress-plugins/accesspress-social-pro/' was loaded over HTTPS, but requested an insecure element 'http://demo.accesspressthemes.com/wordpress-plugins/accesspress-social-pro/wp-content/uploads/2019/07/accesspress-social-pro-salespage.jpg'. This request was automatically upgraded to HTTPS, For more information see https://blog.chromium.org/2019/10/no-more-mixed-messages-about-https.html
    • > GET request to /wp-admin/admin.php?page=apss-premium
    • > Javascript (severe) in unknown
    https://accesspressthemes.com/wordpress-plugins/accesspress-social-pro/ - Access to script at 'https://embed.tawk.to/60cc2bbb65b7290ac63693ec/1f8eollms' from origin 'https://accesspressthemes.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #3 (Backend Social Networks Section), #4 (Backend Share Options Section), #5 (Backend Display Settings Section), #6 (Backend Miscellaneous Settings Section)
The official readme.txt is a good inspiration

accesspress-social-share/accesspress-social-share.php Passed 13 tests

"AccessPress Social Share" version 4.5.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
89 characters long description:
A plugin to add various social media shares to a site with dynamic configuration options.

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 plugin19,552 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
SVG601214,090
CSS41,211273,319
PHP12215961,912
PO File16887168
JavaScript38763

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity147.00
▷ Minimum class complexity147.00
▷ Maximum class complexity147.00
Average method complexity5.29
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods34
▷ Static methods12.94%
▷ Public methods3397.06%
▷ Protected methods00.00%
▷ Private methods12.94%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants18100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
16 PNG files occupy 1.36MB with 0.84MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/upgrade-btn.png1.92KB0.52KB▼ 73.18%
images/logo-old.png4.35KB1.86KB▼ 57.17%
images/promo-top.png74.47KB25.70KB▼ 65.49%
images/promo-bottom.png101.50KB35.05KB▼ 65.47%
images/appro.png6.29KB3.25KB▼ 48.25%