10% ravelry-projects-widget

Code Review | Ravelry Projects Widget

WordPress plugin Ravelry Projects Widget scored10%from 54 tests.

About plugin

  • Plugin page: ravelry-projects-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 6.3.1
  • First release: Dec 30, 2012
  • Latest release: Feb 12, 2019
  • Number of updates: 13
  • Update frequency: every 171.9 days
  • Top authors: lindstedt (84.62%)spazure (23.08%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /2,449 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/ravelry-projects-widget/ravelry-projects-widget.php+201
    Function create_function() is deprecated

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

A check of server-side resources used by Ravelry Projects Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.443.90 ▼36.83
Dashboard /wp-admin2.05 ▼1.265.94 ▼45.12
Posts /wp-admin/edit.php2.05 ▼1.315.17 ▼39.41
Add New Post /wp-admin/post-new.php2.05 ▼3.845.18 ▼86.06
Media Library /wp-admin/upload.php2.05 ▼1.185.20 ▼27.82

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_ravelry_projects

Browser metrics Passed 4 tests

Ravelry Projects Widget: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.27 ▼1.131.63 ▼0.1641.08 ▼6.39
Dashboard /wp-admin2,203 ▲155.83 ▲0.94108.68 ▼2.5338.50 ▼10.30
Posts /wp-admin/edit.php2,089 ▲182.04 ▲0.0335.34 ▼2.9232.98 ▼4.38
Add New Post /wp-admin/post-new.php1,542 ▼018.15 ▼0.07622.87 ▲10.6559.24 ▲9.43
Media Library /wp-admin/upload.php1,385 ▼04.19 ▼0.0298.91 ▼1.6142.85 ▲1.05

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
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/ravelry-projects-widget/ravelry-projects-widget.php+201
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_ravelry_projects
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ravelry-projects-widget/ravelry-projects-widget.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

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: knitting, ravelry, crochet, widget

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

"Ravelry Projects Widget" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
46 characters long description:
Show your recent Ravelry projects in a widget.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin219 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP12954132
PO File1161850
CSS10037

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity5.50
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ravelry-icon-16x16.png0.80KB0.87KB0.00%
ravelry-text-icon.png1.29KB1.30KB0.00%