84% ravelry-designs-widget

Code Review | Ravelry Designs Widget

WordPress plugin Ravelry Designs Widget scored84%from 54 tests.

About plugin

  • Plugin page: ravelry-designs-w...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Aug 15, 2014
  • Latest release: Jun 7, 2018
  • Number of updates: 6
  • Update frequency: every 233.2 days
  • Top authors: Shellbot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,238 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.45ms] Passed 4 tests

An overview of server-side resources used by Ravelry Designs Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.11 ▼2.05
Dashboard /wp-admin3.32 ▲0.0143.67 ▼2.07
Posts /wp-admin/edit.php3.37 ▲0.0145.33 ▼5.03
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.88 ▼16.65
Media Library /wp-admin/upload.php3.24 ▲0.0136.35 ▼1.08

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
widget_ravelry_designs_widget
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Ravelry Designs Widget: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.30 ▼1.261.74 ▲0.2244.14 ▼1.12
Dashboard /wp-admin2,206 ▲185.86 ▼0.02108.18 ▼1.7540.82 ▼6.94
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0139.42 ▼0.6534.25 ▼2.23
Add New Post /wp-admin/post-new.php1,541 ▼318.19 ▲0.06647.92 ▲8.0059.64 ▲0.83
Media Library /wp-admin/upload.php1,391 ▲34.21 ▼0.0392.45 ▼3.8241.57 ▼1.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • db_upgraded
    • widget_ravelry_designs_widget
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

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
The smoke test was a success, however most plugin functionality was not tested

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
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/ravelry-designs-widget/ravelry-designs-widget.php:18
    • > PHP Fatal error
      require_once(): Failed opening required 'PLUGIN_PATHclass-rdw-widget.php' (include_path='.:/usr/share/php') in wp-content/plugins/ravelry-designs-widget/class-ravelry-designs-widget.php on line 2
    • > PHP Warning
      require_once(PLUGIN_PATHclass-rdw-widget.php): failed to open stream: No such file or directory in wp-content/plugins/ravelry-designs-widget/class-ravelry-designs-widget.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ravelry-designs-widget/class-rdw-widget.php:5
    • > PHP Warning
      Use of undefined constant PLUGIN_PATH - assumed 'PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ravelry-designs-widget/class-ravelry-designs-widget.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: knitting, ravelry, widget, crochet

ravelry-designs-widget/ravelry-designs-widget.php Passed 13 tests

"Ravelry Designs Widget" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
66 characters long description:
Display your own knitting & crochet designs straight from Ravelry.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin254 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP45952254

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity7.67
▷ Minimum class complexity2.00
▷ Maximum class complexity14.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods216.67%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There are no PNG files in this plugin