72% social-offers-and-digital-downloads

Code Review | Social Offers

WordPress plugin Social Offers scored72%from 54 tests.

About plugin

  • Plugin page: social-offers-and...
  • Plugin version: 1.4.53
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.3.2
  • WordPress version: 6.3.1
  • First release: Jul 30, 2015
  • Latest release: Jan 28, 2020
  • Number of updates: 589
  • Update frequency: every 2.8 days
  • Top authors: socialintents (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /31,100 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.37ms] Passed 4 tests

An overview of server-side resources used by Social Offers
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.35 ▼9.73
Dashboard /wp-admin3.34 ▲0.0351.99 ▼3.56
Posts /wp-admin/edit.php3.39 ▲0.0353.69 ▲3.99
Add New Post /wp-admin/post-new.php5.92 ▲0.0389.28 ▲0.31
Media Library /wp-admin/upload.php3.26 ▲0.0338.49 ▼0.50
Social Offers /wp-admin/options-general.php?page=social-offers-and-digital-downloads3.2031.49

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Social Offers
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8513.25 ▼1.041.82 ▼0.1040.45 ▼3.35
Dashboard /wp-admin2,222 ▲374.88 ▲0.00112.86 ▲5.5083.45 ▲41.89
Posts /wp-admin/edit.php2,123 ▲282.03 ▲0.0640.59 ▼1.1238.53 ▲1.55
Add New Post /wp-admin/post-new.php1,557 ▲3523.29 ▲0.15612.60 ▼66.8551.92 ▼1.09
Media Library /wp-admin/upload.php1,411 ▲234.25 ▲0.07102.32 ▼7.7378.21 ▲27.78
Social Offers /wp-admin/options-general.php?page=social-offers-and-digital-downloads9232.2029.2029.77

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=social-offers-and-digital-downloads
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=social-offers-and-digital-downloads
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/social-offers-and-digital-downloads/options.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/social-offers-and-digital-downloads/social-offers-and-digital-downloads.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Social Offers Example), #2 (Social Offers Second Example), #3 (Social Offers Plugin Settings), #4 (Social Offers Advanced settings), #5 (Social Offers Dashboard)
You can take inspiration from this readme.txt

social-offers-and-digital-downloads/social-offers-and-digital-downloads.php Passed 13 tests

The entry point to "Social Offers" version 1.4.53 is a PHP file that has certain tags in its header comment area
39 characters long description:
Social Offers to build your email list.

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
Everything looks great! No dangerous files found in this plugin185 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2248185

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 1.20MB with 0.82MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png375.35KB112.37KB▼ 70.06%
screenshot-5.png209.66KB55.03KB▼ 73.75%
screenshot-2.png375.35KB112.37KB▼ 70.06%
socialintents.png32.92KB11.21KB▼ 65.97%
screenshot-3.png115.91KB45.32KB▼ 60.90%