84% clone-test-db

Code Review | Clone Test DB

WordPress plugin Clone Test DB scored84%from 54 tests.

About plugin

  • Plugin page: clone-test-db
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.2
  • WordPress version: 6.3.1
  • First release: Dec 7, 2021
  • Latest release: Dec 8, 2021
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: yuyahoshino (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /331 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼8.24ms] Passed 4 tests

This is a short check of server-side resources used by Clone Test DB
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0337.33 ▼4.61
Dashboard /wp-admin3.34 ▼0.0046.90 ▼17.36
Posts /wp-admin/edit.php3.39 ▲0.0446.00 ▲0.78
Add New Post /wp-admin/post-new.php5.92 ▲0.0489.72 ▼11.76
Media Library /wp-admin/upload.php3.27 ▲0.0437.71 ▲4.56
Clone Test DB /wp-admin/tools.php?page=clone_test_db3.2534.48

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Clone Test DB
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.38 ▼0.111.68 ▲0.0238.95 ▼4.07
Dashboard /wp-admin2,199 ▲285.56 ▼0.1183.67 ▼14.6937.49 ▼4.97
Posts /wp-admin/edit.php2,101 ▲12.03 ▲0.0539.25 ▲0.2635.13 ▲0.04
Add New Post /wp-admin/post-new.php1,541 ▲1623.38 ▲0.28608.75 ▼56.6656.35 ▲0.00
Media Library /wp-admin/upload.php1,404 ▲74.16 ▼0.0393.73 ▼5.6339.81 ▼2.03
Clone Test DB /wp-admin/tools.php?page=clone_test_db9141.9921.9537.77

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/clone-test-db/clone-test-db.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (This is the initial screen.) image missing
  • Donate link: Invalid url: ""
The official readme.txt is a good inspiration

clone-test-db/clone-test-db.php Passed 13 tests

"Clone Test DB" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
71 characters long description:
Duplicate the table in another database and optimize it as a test site.

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
No dangerous file extensions were detected313 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13745210
CSS12154
PO File1141649

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity38.00
▷ Minimum class complexity38.00
▷ Maximum class complexity38.00
Average method complexity7.17
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png25.68KB10.28KB▼ 59.99%