10% diy

Code Review | Flux Test Suite

WordPress plugin Flux Test Suite scored10%from 54 tests.

About plugin

  • Plugin page: diy
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-3.3.1
  • WordPress version: 6.3.1
  • First release: Jan 30, 2012
  • Latest release: May 18, 2012
  • Number of updates: 25
  • Update frequency: every 4.4 days
  • Top authors: OneManOneLaptop (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,421 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/diy/diytests.php+30
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼57.42ms] Passed 4 tests

Server-side resources used by Flux Test Suite
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.55 ▼38.91
Dashboard /wp-admin2.05 ▼1.265.61 ▼47.98
Posts /wp-admin/edit.php2.05 ▼1.316.50 ▼44.39
Add New Post /wp-admin/post-new.php2.05 ▼3.845.76 ▼98.41
Media Library /wp-admin/upload.php2.05 ▼1.185.28 ▼34.94

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Flux Test Suite
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.74 ▲0.191.61 ▼0.1738.33 ▼5.59
Dashboard /wp-admin2,200 ▲205.58 ▼0.1088.27 ▼12.4739.90 ▼5.60
Posts /wp-admin/edit.php2,108 ▲52.06 ▲0.0239.57 ▲1.3535.08 ▲1.50
Add New Post /wp-admin/post-new.php1,553 ▲1323.08 ▲0.06669.24 ▲2.4458.84 ▲5.06
Media Library /wp-admin/upload.php1,405 ▲54.23 ▲0.06100.81 ▼6.6048.01 ▲2.81

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/diy/diytests.php+30
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/diy/diy.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/diy/diytests.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: framework, plugin, jquery, custom post types

diy/diy.php Passed 13 tests

The main PHP script in "Flux Test Suite" version 0.1.0 is automatically included on every request by WordPress
10 characters long description:
Test Suite

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,228 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21841771,228

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.02
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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.10MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png97.29KB34.43KB▼ 64.62%