10% rivercraft

Code Review | RiverCraft

WordPress plugin RiverCraft scored10%from 54 tests.

About plugin

  • Plugin page: rivercraft
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6
  • WordPress version: 6.3.1
  • First release: Jan 16, 2013
  • Latest release: Sep 8, 2013
  • Number of updates: 22
  • Update frequency: every 10.7 days
  • Top authors: RiverNight (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /3,605 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/rivercraft/widget.php+18
    Methods with the same name as their class will not be constructors in a future version of PHP; rcou_widget has a deprecated constructor

Server metrics [RAM: ▼1.92MB] [CPU: ▼51.49ms] Passed 4 tests

Server-side resources used by RiverCraft
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.395.27 ▼35.67
Dashboard /wp-admin2.09 ▼1.226.38 ▼46.78
Posts /wp-admin/edit.php2.09 ▼1.277.67 ▼39.27
Add New Post /wp-admin/post-new.php2.09 ▼3.808.10 ▼84.25
Media Library /wp-admin/upload.php2.09 ▼1.146.01 ▼28.19

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_rcou-widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by RiverCraft
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.25 ▼0.921.61 ▼0.2245.48 ▼2.16
Dashboard /wp-admin2,229 ▲415.82 ▼0.04101.40 ▼17.4666.36 ▲19.47
Posts /wp-admin/edit.php2,115 ▲231.97 ▼0.2136.75 ▼2.5834.65 ▲6.37
Add New Post /wp-admin/post-new.php1,688 ▲15522.56 ▼0.80717.01 ▲18.4348.12 ▼1.59
Media Library /wp-admin/upload.php1,411 ▲234.16 ▼0.05103.21 ▲5.3449.24 ▲5.61

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/rivercraft/widget.php+18
    Methods with the same name as their class will not be constructors in a future version of PHP; rcou_widget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_rcou-widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 3× 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/rivercraft/panel.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rivercraft/panel.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rivercraft/widget.php:16

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Donate link: Invalid URI ("/")
The official readme.txt is a good inspiration

rivercraft/rivercraft.php Passed 13 tests

The main PHP script in "RiverCraft" version 1.3.2 is automatically included on every request by WordPress
61 characters long description:
Rivercraft permet d'unir Wordpress et Minecraft avec JSONAPI.

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 plugin305 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP45786263
CSS19242

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity4.50
▷ Minimum class complexity3.00
▷ Maximum class complexity6.00
Average method complexity1.58
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/img/back_office/settings.png3.52KB0.92KB▼ 73.98%