84% network-copier

Code Review | Network Menu Copier

WordPress plugin Network Menu Copier scored84%from 54 tests.

About plugin

  • Plugin page: network-copier
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.0
  • WordPress version: 6.3.1
  • First release: Nov 3, 2014
  • Latest release: Nov 7, 2014
  • Number of updates: 9
  • Update frequency: every 1.0 days
  • Top authors: arbet01 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,353 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼0.06ms] Passed 4 tests

Analyzing server-side resources used by Network Menu Copier
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.61 ▼1.55
Dashboard /wp-admin3.38 ▲0.0848.10 ▲2.04
Posts /wp-admin/edit.php3.50 ▲0.1446.55 ▲1.43
Add New Post /wp-admin/post-new.php5.96 ▲0.08103.60 ▲8.18
Media Library /wp-admin/upload.php3.31 ▲0.0834.25 ▼2.16

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Network Menu Copier
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.17 ▼1.131.77 ▼0.7142.95 ▼6.98
Dashboard /wp-admin2,206 ▲214.85 ▲0.02129.24 ▲19.9940.74 ▼8.63
Posts /wp-admin/edit.php2,086 ▼31.99 ▼0.1836.31 ▲0.4236.68 ▲3.94
Add New Post /wp-admin/post-new.php1,542 ▲918.52 ▼4.69644.94 ▼71.5554.02 ▼2.52
Media Library /wp-admin/upload.php1,388 ▼04.15 ▼0.0894.62 ▼17.4340.58 ▼5.16

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/network-copier/inc/options.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/network-copier/network-copier.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/network-copier/lib/NetworkMenuWalker.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/network-copier/lib/NetworkMenuCopier.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/network-copier/inc/log.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: menu, network, multisite, copy, copier...

network-copier/network-copier.php 85% from 13 tests

The main PHP script in "Network Menu Copier" version 1.2.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin6,638 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
HTML36403,167
JavaScript6229622,338
CSS46336653
PHP7290273480

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity9.50
▷ Minimum class complexity5.00
▷ Maximum class complexity13.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods34
▷ Static methods12.94%
▷ Public methods2676.47%
▷ Protected methods00.00%
▷ Private methods823.53%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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 compressed PNG files occupy 0.01MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/chosen.jquery/chosen-sprite@2x.png0.72KB0.83KB0.00%
inc/chosen.jquery/docsupport/oss-credit.png4.30KB3.26KB▼ 24.02%
inc/chosen.jquery/docsupport/chosen.png1.47KB2.08KB0.00%
inc/chosen.jquery/chosen-sprite.png0.53KB0.88KB0.00%