10% discoshare

Code Review | Discoshare

WordPress plugin Discoshare scored10%from 54 tests.

About plugin

  • Plugin page: discoshare
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 1, 2016
  • Latest release: Mar 1, 2016
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: discoshare (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /610 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/discoshare/discoshare.php+80
    Undefined variable: wp_version

Server metrics [RAM: ▼0.01MB] [CPU: ▼6.51ms] Passed 4 tests

Analyzing server-side resources used by Discoshare
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.10 ▲0.19
Dashboard /wp-admin3.31 ▼0.0454.31 ▼11.74
Posts /wp-admin/edit.php3.36 ▲0.0057.53 ▲6.04
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.28 ▼13.07
Media Library /wp-admin/upload.php3.23 ▲0.0035.29 ▼1.40

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 53 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Discoshare
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.37 ▲0.021.80 ▼0.0045.01 ▲1.18
Dashboard /wp-admin2,195 ▲155.61 ▼0.0592.20 ▼0.2539.79 ▼5.00
Posts /wp-admin/edit.php2,100 ▼31.95 ▼0.0739.10 ▼2.6735.84 ▼1.32
Add New Post /wp-admin/post-new.php1,525 ▼123.04 ▼0.30607.40 ▲8.3452.01 ▲1.65
Media Library /wp-admin/upload.php1,394 ▼04.17 ▼0.0399.72 ▼5.4443.87 ▼1.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/discoshare/discoshare.php+305
    Undefined variable: fields_string
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/discoshare/discoshare.php:350

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

readme.txt 81% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #1 (Discoshare dashboard page), #2 (Discoshare campaign page), #3 (Discoshare promotion email example), #4 (Discoshare discount(reward) email example)
  • Donate link: Invalid URI found ("")
The official readme.txt might help

discoshare/discoshare.php Passed 13 tests

The principal PHP file in "Discoshare" v. 1.0 is loaded by WordPress automatically on each request
27 characters long description:
This is just a test version

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
Good job! No executable or dangerous file extensions detected21,084 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
CSS5102815,244
JavaScript116973622,503
Sass1323241,256
LESS1423331,250
SVG100520
PHP119495311

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/discoshare.png15.26KB0.15KB▼ 99.00%
img/discoshare2.png9.96KB5.04KB▼ 49.35%