10% wp-composer-sync

Code Review | WP Composer Sync

WordPress plugin WP Composer Sync scored10%from 54 tests.

About plugin

  • Plugin page: wp-composer-sync
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Jul 26, 2018
  • Latest release: Jul 26, 2018
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: harmonicnewmedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /689 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/wp-composer-sync/wp-composer-sync.php+38
    file_get_contents(../composer.json): failed to open stream: No such file or directory

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

Analyzing server-side resources used by WP Composer Sync
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0233.86 ▼5.67
Dashboard /wp-admin3.33 ▼0.0241.87 ▼16.98
Posts /wp-admin/edit.php3.38 ▲0.0245.39 ▼3.35
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.77 ▼14.61
Media Library /wp-admin/upload.php3.25 ▲0.0233.65 ▼1.17

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WP Composer Sync
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.014.11 ▲2.4139.91 ▼7.80
Dashboard /wp-admin2,206 ▲184.86 ▼0.07110.01 ▼6.9642.99 ▲0.76
Posts /wp-admin/edit.php2,089 ▲32.05 ▼0.0036.50 ▲0.5830.33 ▼3.68
Add New Post /wp-admin/post-new.php1,534 ▲123.26 ▼0.05691.33 ▼1.8152.81 ▼5.79
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.0396.15 ▼17.6840.22 ▼5.18

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: composer

wp-composer-sync/wp-composer-sync.php Passed 13 tests

The main PHP script in "WP Composer Sync" version 1.0 is automatically included on every request by WordPress
88 characters long description:
Automatically keeps your composer.json file in sync with plugins installed via wp-admin.

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 detected180 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2265991
Markdown125071
JSON10018

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin