10% fanplayr-social-coupons

Code Review | Fanplayr Social Coupons

WordPress plugin Fanplayr Social Coupons scored10%from 54 tests.

About plugin

  • Plugin page: fanplayr-social-c...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.4
  • WordPress version: 6.3.1
  • First release: Jun 21, 2012
  • Latest release: Mar 10, 2016
  • Number of updates: 13
  • Update frequency: every 104.4 days
  • Top authors: fanplayr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,370 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Parse error in wp-content/plugins/fanplayr-social-coupons/fanplayr-wpc.php+582
    syntax error, unexpected end of file

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.18ms] Passed 4 tests

Analyzing server-side resources used by Fanplayr Social Coupons
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.35 ▼0.94
Dashboard /wp-admin3.31 ▲0.0043.83 ▼6.74
Posts /wp-admin/edit.php3.36 ▲0.0046.73 ▲1.30
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.70 ▼10.33
Media Library /wp-admin/upload.php3.23 ▲0.0033.97 ▲1.70

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Fanplayr Social Coupons
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.31 ▼1.241.74 ▼0.1844.76 ▲0.82
Dashboard /wp-admin2,206 ▲214.88 ▼0.93105.34 ▲6.5239.52 ▲3.06
Posts /wp-admin/edit.php2,086 ▼32.06 ▲0.0435.23 ▲0.1631.76 ▼1.89
Add New Post /wp-admin/post-new.php1,514 ▼317.48 ▼0.10670.41 ▲5.0652.33 ▲5.59
Media Library /wp-admin/upload.php1,388 ▼04.24 ▲0.08106.58 ▲2.7147.80 ▲5.45

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/fanplayr-social-coupons/deputy_tpl.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/fanplayr-social-coupons/fanplayr-wpc.php on line 582
    • > PHP Notice
      Undefined variable: v in wp-content/plugins/fanplayr-social-coupons/deputy_tpl.php on line 6
    • > PHP Notice
      Undefined variable: k in wp-content/plugins/fanplayr-social-coupons/deputy_tpl.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid URI: ""
  • Stable tag: No value
The official readme.txt is a good inspiration

fanplayr-social-coupons/fanplayr-wpc.php 85% from 13 tests

The principal PHP file in "Fanplayr Social Coupons" v. 1.2.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("fanplayr-social-coupons.php" instead of "fanplayr-wpc.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 149 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,205 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP312478558
JavaScript25027376
CSS1284234
HTML15037

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity5.50
▷ Minimum class complexity3.00
▷ Maximum class complexity8.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
12 PNG files occupy 1.12MB with 0.40MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
res/images/star_gold.png0.69KB0.58KB▼ 15.80%
res/images/logo_32.png15.07KB0.24KB▼ 98.38%
screenshot-2.png233.88KB80.91KB▼ 65.40%
screenshot-1.png109.55KB109.45KB0.10%
res/images/warning.png0.65KB0.68KB0.00%