84% rentything-offers-widget

Code Review | Rentything Offers Widget

WordPress plugin Rentything Offers Widget scored84%from 54 tests.

About plugin

  • Plugin page: rentything-offers...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 6.3.1
  • First release: Jun 13, 2013
  • Latest release: Jun 13, 2013
  • Number of updates: 3
  • Update frequency: every 2.0 days
  • Top authors: landland (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /690 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼10.39ms] Passed 4 tests

This is a short check of server-side resources used by Rentything Offers Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.19 ▼12.96
Dashboard /wp-admin3.33 ▲0.0348.45 ▲1.38
Posts /wp-admin/edit.php3.38 ▲0.0243.67 ▼9.14
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.08 ▼18.40
Media Library /wp-admin/upload.php3.26 ▲0.0234.98 ▼1.07

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Rentything Offers Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▼0.321.76 ▼0.4143.89 ▼4.61
Dashboard /wp-admin2,209 ▲185.88 ▲0.02101.29 ▼2.8940.96 ▼1.21
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0334.01 ▼7.7438.10 ▲2.23
Add New Post /wp-admin/post-new.php1,517 ▼1617.86 ▼5.25634.71 ▲15.9352.97 ▼1.30
Media Library /wp-admin/upload.php1,388 ▲34.22 ▼0.0293.52 ▼9.5341.65 ▼4.13

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_rentything_offers
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rentything-offers-widget/rentything-widget.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: rentything, offers, widget, collaborative consumption, sharing economy...

rentything-offers-widget/rentything-widget.php 92% from 13 tests

The principal PHP file in "Rentything Offers Widget" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("rentything-offers-widget.php" instead of "rentything-widget.php")

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
Good job! No executable or dangerous file extensions detected122 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11418122

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity5.00
▷ 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
There were not PNG files found in your plugin