93% wplr-sync-folders

Code Review | WP/LR Sync Folders with Real Media Library

WordPress plugin WP/LR Sync Folders with Real Media Library scored 93% from 54 tests.

About plugin

  • Plugin page: wplr-sync-folders
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.4
  • WordPress version: 5.8.1
  • First release: Jun 21, 2018
  • Latest release: Mar 27, 2020
  • Number of updates: 19
  • Update frequency: every 34.0 days
  • Top authors: mguenter (94.74%)devowl (10.53%)

Code review

54 tests

User reviews

6 reviews

Install metrics

300+ active / 3,653 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.20MB] [CPU: ▼142.15ms] Passed 4 tests

A check of server-side resources used by WP/LR Sync Folders with Real Media Library
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.18 ▲0.3437.11 ▼4.50
Dashboard /wp-admin3.30 ▲0.2445.03 ▼1.90
Posts /wp-admin/edit.php3.35 ▲0.2445.74 ▲8.12
Add New Post /wp-admin/post-new.php5.59 ▲0.1694.97 ▼560.99
Media Library /wp-admin/upload.php3.18 ▲0.1836.82 ▼1.21

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 58 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for WP/LR Sync Folders with Real Media Library
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,738 ▲16615.72 ▲0.249.63 ▲0.7050.11 ▼4.97
Dashboard /wp-admin2,986 ▲556.03 ▲0.08147.79 ▼4.68115.79 ▼0.72
Posts /wp-admin/edit.php2,758 ▲192.69 ▼0.0068.21 ▼0.11100.24 ▲4.78
Add New Post /wp-admin/post-new.php1,695 ▲9118.81 ▼0.01389.99 ▼5.91121.34 ▲2.43
Media Library /wp-admin/upload.php1,826 ▲195.06 ▲0.06167.44 ▲12.40130.53 ▼0.60

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 20× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/wplr-sync-folders/inc/base/Assets.class.php
    • > /wp-content/plugins/wplr-sync-folders/inc/rest/Service.class.php
    • > /wp-content/plugins/wplr-sync-folders/inc/folder/Root.class.php
    • > /wp-content/plugins/wplr-sync-folders/inc/others/fallback-rest-api.php
    • > /wp-content/plugins/wplr-sync-folders/index.php
    • > /wp-content/plugins/wplr-sync-folders/inc/base/Base.class.php
    • > /wp-content/plugins/wplr-sync-folders/inc/general/Activator.class.php
    • > /wp-content/plugins/wplr-sync-folders/inc/folder/Folder.class.php
    • > /wp-content/plugins/wplr-sync-folders/inc/others/fallback-php-version.php
    • > /wp-content/plugins/wplr-sync-folders/inc/others/fallback-wplr.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found


Plugin configuration 86% from 29 tests

readme.txt 94% 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
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can look at the official readme.txt

wplr-sync-folders/index.php 77% from 13 tests

The entry point to "WP/LR Sync Folders with Real Media Library" version 1.1.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: Please don't use more than 140 characters for the plugin description (currently 146 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("wplr-sync-folders.php" instead of "index.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
Everything looks great! No dangerous files found in this plugin1,446 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity11.12
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
▷ Abstract classes320.00%
▷ Concrete classes1280.00%
▷ Final classes00.00%
▷ Static methods1210.91%
▷ Public methods10494.55%
▷ Protected methods21.82%
▷ Private methods43.64%
▷ Named functions685.71%
▷ Anonymous functions114.29%
▷ Global constants1463.64%
▷ Class constants836.36%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin