78% simple-sugarsync-upload

Code Review | Simple Sugarsync Upload

WordPress plugin Simple Sugarsync Upload scored78%from 54 tests.

About plugin

  • Plugin page: simple-sugarsync-...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-3.3
  • WordPress version: 6.3.1
  • First release: Mar 23, 2012
  • Latest release: May 10, 2012
  • Number of updates: 12
  • Update frequency: every 4.1 days
  • Top authors: hiphopsmurf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,395 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.14MB] [CPU: ▼4.91ms] Passed 4 tests

This is a short check of server-side resources used by Simple Sugarsync Upload
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1440.78 ▲2.66
Dashboard /wp-admin3.46 ▲0.1145.64 ▼17.07
Posts /wp-admin/edit.php3.57 ▲0.2147.91 ▲5.04
Add New Post /wp-admin/post-new.php6.03 ▲0.1590.49 ▼4.31
Media Library /wp-admin/upload.php3.38 ▲0.1535.74 ▼0.90
Simple SugarSync /wp-admin/options-general.php?page=simple-sugarsync-upload/simple-sugarsync.php3.3230.30

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 12 new options
New WordPress options
wp_ssync_secret
wp_ssync_version_number
widget_theysaidso_widget
wp_ssync_key
widget_recent-comments
widget_recent-posts
wp_ssync_show_form
theysaidso_admin_options
wp_ssync_temp_path
wp_ssync_menu_pref
...

Browser metrics Passed 4 tests

Simple Sugarsync Upload: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲5813.27 ▼1.112.10 ▲0.3444.13 ▲4.63
Dashboard /wp-admin2,210 ▲224.80 ▼0.10107.70 ▲2.2740.80 ▼1.43
Posts /wp-admin/edit.php2,093 ▲12.03 ▲0.0339.27 ▲1.9033.91 ▲4.17
Add New Post /wp-admin/post-new.php1,522 ▲123.51 ▲0.49593.80 ▼56.2863.26 ▲6.24
Media Library /wp-admin/upload.php1,395 ▲104.17 ▼0.0895.26 ▼6.2241.99 ▼2.76
Simple SugarSync /wp-admin/options-general.php?page=simple-sugarsync-upload/simple-sugarsync.php1,0112.1927.9926.24

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% 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)
Smoke test failed, please fix the following
  • 25 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple-sugarsync-upload/simple-sugarsync.php
    • > Warning in wp-content/plugins/simple-sugarsync-upload/simple-sugarsync.php+427
    Use of undefined constant simpleSsyncUpload - assumed 'simpleSsyncUpload' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=simple-sugarsync-upload/simple-sugarsync.php
    • > Notice in wp-content/plugins/simple-sugarsync-upload/simple-sugarsync.php+271
    Undefined index: wp_ssync_submit_hidden
    • > GET request to /wp-admin/options-general.php?page=simple-sugarsync-upload/simple-sugarsync.php
    • > Notice in wp-content/plugins/simple-sugarsync-upload/simple-sugarsync.php+338
    Undefined variable: reset

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/simple-sugarsync-upload/simple-sugarsync.php:571

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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:
  • Screenshots: These screenshots do not have images: #1 (Admin Panel.), #2 (Before a file is uploaded by user.), #3 (After a file is uploaded by user.)
The official readme.txt might help

simple-sugarsync-upload/simple-sugarsync.php 92% from 13 tests

The main file in "Simple Sugarsync Upload" v. 1.2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simple-sugarsync-upload.php" instead of "simple-sugarsync.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected607 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2219122607
CSS1110

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity39.00
▷ Minimum class complexity1.00
▷ Maximum class complexity77.00
Average method complexity8.60
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods990.00%
▷ Protected methods00.00%
▷ Private methods110.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.10MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/sugarsync-icon.png0.84KB0.93KB0.00%
screenshot-2.png51.16KB28.33KB▼ 44.62%
screenshot-3.png51.62KB27.98KB▼ 45.80%