10% site2site

Code Review | site2site

WordPress plugin site2site scored10%from 54 tests.

About plugin

  • Plugin page: site2site
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 21, 2015
  • Latest release: Jul 21, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: alancf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /684 total downloads

Benchmarks

Plugin footprint 40% 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
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/site2site/includes/class_copier.php+5
    Methods with the same name as their class will not be constructors in a future version of PHP; S2S_copier has a deprecated constructor

Server metrics [RAM: ▼1.82MB] [CPU: ▼54.10ms] Passed 4 tests

An overview of server-side resources used by site2site
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.295.30 ▼34.81
Dashboard /wp-admin2.19 ▼1.116.49 ▼44.24
Posts /wp-admin/edit.php2.19 ▼1.168.62 ▼42.96
Add New Post /wp-admin/post-new.php2.19 ▼3.695.81 ▼94.39
Media Library /wp-admin/upload.php2.19 ▼1.045.65 ▼32.10

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by site2site
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.27 ▼1.135.30 ▲3.5442.14 ▼1.31
Dashboard /wp-admin2,210 ▲194.88 ▼0.22112.95 ▲4.2142.42 ▼4.99
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0244.42 ▲7.0433.61 ▼3.18
Add New Post /wp-admin/post-new.php1,523 ▲423.06 ▼0.17670.60 ▼18.8151.45 ▼0.13
Media Library /wp-admin/upload.php1,392 ▲14.33 ▲0.1197.99 ▼4.8442.26 ▼7.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/site2site/includes/class_copier.php+5
    Methods with the same name as their class will not be constructors in a future version of PHP; S2S_copier has a deprecated constructor
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/site2site/site2site.php:34

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: multisite, copy posts, copy content

site2site/site2site.php Passed 13 tests

This is the main PHP file of "site2site" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
71 characters long description:
Copies any content from one site to another in a multisite installation

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin569 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP214342409
JavaScript11916138
CSS14022

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity22.00
▷ Minimum class complexity10.00
▷ Maximum class complexity34.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods15.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin