84% ditto

Code Review | Ditto

WordPress plugin Ditto scored84%from 54 tests.

About plugin

  • Plugin page: ditto
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.1
  • WordPress version: 6.3.1
  • First release: Oct 4, 2013
  • Latest release: Dec 31, 2014
  • Number of updates: 8
  • Update frequency: every 56.6 days
  • Top authors: lordspace (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,023 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
Installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼1.75ms] Passed 4 tests

A check of server-side resources used by Ditto
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1040.19 ▼2.28
Dashboard /wp-admin3.42 ▲0.1250.31 ▼7.09
Posts /wp-admin/edit.php3.53 ▲0.1851.50 ▼0.87
Add New Post /wp-admin/post-new.php6.00 ▲0.1194.64 ▲3.25
Media Library /wp-admin/upload.php3.34 ▲0.1139.19 ▲7.89
Deploy /wp-admin/admin.php?page=ditto-deploy3.3335.03
Dashboard /wp-admin/admin.php?page=ditto3.3142.58
Help /wp-admin/admin.php?page=ditto-help3.3143.49
Settings /wp-admin/admin.php?page=ditto-settings3.3138.04

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Ditto: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲6814.22 ▼0.401.71 ▲0.0644.40 ▲1.80
Dashboard /wp-admin2,216 ▲395.55 ▲0.0298.76 ▲12.2391.76 ▲48.55
Posts /wp-admin/edit.php2,139 ▲421.99 ▼0.0341.90 ▲1.6434.89 ▲0.26
Add New Post /wp-admin/post-new.php1,558 ▲2923.08 ▲0.05707.43 ▲23.7555.17 ▲1.90
Media Library /wp-admin/upload.php1,433 ▲334.13 ▼0.15106.90 ▼0.3879.49 ▲31.85
Deploy /wp-admin/admin.php?page=ditto-deploy9772.1723.3427.13
Dashboard /wp-admin/admin.php?page=ditto1,4569.20281.7979.55
Help /wp-admin/admin.php?page=ditto-help1,4279.17278.3349.17
Settings /wp-admin/admin.php?page=ditto-settings8572.1923.5928.92

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

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 | 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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ditto/ditto.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 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
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Plugin's dashboard page), #2 (Plugin's deploy page)
  • Tags: There are too many tags (14 tag instead of maximum 10)
The official readme.txt is a good inspiration

ditto/ditto.php Passed 13 tests

The principal PHP file in "Ditto" v. 1.0.1 is loaded by WordPress automatically on each request
95 characters long description:
This plugin allows you copy a plugin and theme (TODO) to a test/sandbox WordPress installation.

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 plugin720 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2186213694
CSS27526
JavaScript1010

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity8.20
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity3.77
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods13
▷ Static methods1076.92%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.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
5 PNG files occupy 0.16MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png95.17KB36.17KB▼ 62.00%
i/guNzr.qr.2.png0.23KB0.23KB0.43%
screenshot-2.png65.88KB23.80KB▼ 63.87%
assets/server.png0.52KB0.65KB0.00%
i/guNzr.qr.16.png0.39KB0.41KB0.00%