83% staging-sync

Code Review | Synchronize your staging site with your live site!

WordPress plugin Synchronize your staging site with your live site! scored83%from 54 tests.

About plugin

  • Plugin page: staging-sync
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0.2
  • WordPress version: 6.3.1
  • First release: Sep 21, 2022
  • Latest release: Sep 21, 2022
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: legiitcom (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /552 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.23MB] [CPU: ▼10.07ms] Passed 4 tests

A check of server-side resources used by Synchronize your staging site with your live site!
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1837.44 ▼7.48
Dashboard /wp-admin3.52 ▲0.2247.22 ▼6.15
Posts /wp-admin/edit.php3.62 ▲0.2749.22 ▼1.39
Add New Post /wp-admin/post-new.php6.23 ▲0.3583.01 ▼23.56
Media Library /wp-admin/upload.php3.46 ▲0.2337.89 ▼3.07

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Synchronize your staging site with your live site!: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4814.39 ▲0.021.56 ▼0.5940.73 ▼9.76
Dashboard /wp-admin2,218 ▲415.63 ▼0.0484.80 ▼13.2438.71 ▼5.21
Posts /wp-admin/edit.php2,120 ▲202.03 ▲0.0339.44 ▲0.6036.23 ▼0.89
Add New Post /wp-admin/post-new.php1,543 ▲1523.22 ▼0.00688.18 ▲25.0554.95 ▲6.51
Media Library /wp-admin/upload.php1,417 ▲174.15 ▲0.03109.16 ▼5.7646.21 ▼0.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, 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
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function SSync\\plugin_dir_path() in wp-content/plugins/staging-sync/ssync.php:19
    • > PHP Warning
      Use of undefined constant SSYNC_ASSETS - assumed 'SSYNC_ASSETS' (this will throw an Error in a future version of PHP) in wp-content/plugins/staging-sync/includes/settings_page.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/staging-sync/includes/settings_page.php:9
    • > PHP Warning
      Use of undefined constant SSYNC_ASSETS - assumed 'SSYNC_ASSETS' (this will throw an Error in a future version of PHP) in wp-content/plugins/staging-sync/includes/not_loggedin.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/staging-sync/includes/not_loggedin.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: sync, copy posts, staging, live

staging-sync/ssync.php 62% from 13 tests

Analyzing the main PHP file in "Synchronize your staging site with your live site!" version 1.0.0
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("staging-sync.php" instead of "ssync.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Requires at least: Required version does not match the one declared in readme.txt ("4.9" instead of "5.2")
  • Requires PHP: Required version does not match the one declared in readme.txt ("5.4" instead of "7.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected850 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP516250724
CSS1190119
JavaScript1207

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity23.67
▷ Minimum class complexity10.00
▷ Maximum class complexity33.00
Average method complexity3.34
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods2896.55%
▷ Protected methods00.00%
▷ Private methods13.45%
Functions0
▷ Named functions00.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
4 PNG files occupy 0.09MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ssync.png74.92KB32.04KB▼ 57.23%
assets/images/staging.png2.60KB1.79KB▼ 31.16%
assets/images/live.png1.94KB1.43KB▼ 26.34%
assets/images/legiit.png8.33KB4.35KB▼ 47.80%