78% square-sync

Code Review | Square Sync

WordPress plugin Square Sync scored78%from 54 tests.

About plugin

  • Plugin page: square-sync
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.1-4.1.1
  • WordPress version: 6.3.1
  • First release: Mar 10, 2015
  • Latest release: Mar 10, 2015
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: rdonk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,815 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
This plugin's installer ran successfully

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

Server-side resources used by Square Sync
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.23 ▼8.30
Dashboard /wp-admin3.31 ▲0.0144.67 ▼11.32
Posts /wp-admin/edit.php3.36 ▲0.0143.35 ▼3.30
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.89 ▼10.31
Media Library /wp-admin/upload.php3.23 ▲0.0136.97 ▲1.88

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 11 new options
New WordPress options
theysaidso_admin_options
square_sync_crop_y
square_sync_image_x
square_sync_crop_x
widget_theysaidso_widget
square_sync_version
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
...

Browser metrics Passed 4 tests

A check of browser resources used by Square Sync
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9613.22 ▼1.461.92 ▲0.0841.83 ▼1.58
Dashboard /wp-admin2,210 ▲225.87 ▼0.0399.48 ▼14.3138.16 ▼8.98
Posts /wp-admin/edit.php2,090 ▲12.01 ▲0.0335.06 ▼1.8429.98 ▼4.85
Add New Post /wp-admin/post-new.php1,536 ▲323.27 ▲0.14676.46 ▼4.4457.55 ▲3.31
Media Library /wp-admin/upload.php1,395 ▲74.21 ▲0.0197.43 ▼12.3842.07 ▼1.25
Square Sync /wp-admin/square-sync.php260.440.1613.36

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/square-sync/square-sync.php:47

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/square-sync.php
    • > Network (severe)
    wp-admin/square-sync.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid URI found ("www.ryandonkersgoed.com")
  • Screenshots: Screenshot #1 (This is a screen shot of the admin page) image not found
Please take inspiration from this readme.txt

square-sync/square-sync.php Passed 13 tests

The main file in "Square Sync" v. 0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
67 characters long description:
Loads Square Inventory into wordpress page or post using shortcode.

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
There were no executable files found in this plugin358 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1196155343
CSS13615

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/no_image.png33.58KB13.68KB▼ 59.27%