84% ritmo

Code Review | Ritmo

WordPress plugin Ritmo scored 84% from 54 tests.

About plugin

  • Plugin page: ritmo
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7.2
  • WordPress version: 5.9.2
  • First release: May 24, 2016
  • Latest release: Mar 5, 2017
  • Number of updates: 4
  • Update frequency: every 71.3 days
  • Top authors: mostafa.s1990 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,082 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼300.16ms] Passed 4 tests

This is a short check of server-side resources used by Ritmo
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.1661.66 ▲14.02
Dashboard /wp-admin3.52 ▲0.1134.69 ▲1.18
Posts /wp-admin/edit.php3.74 ▲0.1045.15 ▲5.30
Add New Post /wp-admin/post-new.php6.98 ▲0.0193.81 ▼1,206.73
Media Library /wp-admin/upload.php3.39 ▲0.1025.05 ▼0.37
Ritmo /wp-admin/options-general.php?page=ritmo3.3622.84

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 2 new options
New WordPress options
widget_ritmo_widget
ritmo_settings

Browser metrics Passed 4 tests

An overview of browser requirements for Ritmo
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,799 ▲7315.82 ▲0.116.13 ▲0.222.54 ▲0.28
Dashboard /wp-admin2,897 ▲396.15 ▼0.07116.22 ▼16.04160.89 ▼2.98
Posts /wp-admin/edit.php2,677 ▼173.24 ▼0.00100.43 ▲34.96161.96 ▲21.94
Add New Post /wp-admin/post-new.php1,776 ▲11821.10 ▲0.92483.37 ▲74.58183.44 ▲12.50
Media Library /wp-admin/upload.php1,703 ▲85.53 ▲0.00140.40 ▼9.59195.82 ▲3.58
Ritmo /wp-admin/options-general.php?page=ritmo1,0712.3791.38142.88

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 2 options in the database
    • ritmo_settings
    • widget_ritmo_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)
Everything seems fine, however 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
Almost there! Just fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/ritmo/templates/ritmo-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/ritmo/ritmo.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ritmo/widget.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
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
9 plugin tags: playlist, album, iframe, shortcode, music...

ritmo/ritmo.php Passed 13 tests

This is the main PHP file of "Ritmo" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
26 characters long description:
Ritmo player for wordpress

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
No dangerous file extensions were detected542 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP6149159496
PO File1253844
Markdown1002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity10.50
▷ Minimum class complexity7.00
▷ Maximum class complexity14.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 were not PNG files found in your plugin