10% rentivo-widgets

Code Review | Rentivo Widgets

WordPress plugin Rentivo Widgets scored 10% from 54 tests.

About plugin

  • Plugin page: rentivo-widgets
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5.2
  • WordPress version: 6.3.1
  • First release: Jun 10, 2016
  • Latest release: Nov 15, 2016
  • Number of updates: 16
  • Update frequency: every 12.6 days
  • Top authors: dannychickenegg (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 689 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/rentivo-widgets/framework/shared.php+34
    Function get_magic_quotes_gpc() is deprecated

Server metrics [RAM: ▼1.93MB] [CPU: ▼51.97ms] Passed 4 tests

A check of server-side resources used by Rentivo Widgets
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.414.41 ▼36.72
Dashboard /wp-admin2.07 ▼1.235.78 ▼41.42
Posts /wp-admin/edit.php2.07 ▼1.286.97 ▼44.76
Add New Post /wp-admin/post-new.php2.07 ▼3.816.31 ▼84.99
Media Library /wp-admin/upload.php2.07 ▼1.154.82 ▼28.64
Settings /wp-admin/admin.php?page=rentivo-settings2.075.72
Rentivo Widgets /wp-admin/admin.php?page=rentivo-index2.075.76

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 707 new files
Database: no new tables, 36 new options
New WordPress options
propertyNearbyProperties
locationsPropertiesListing
propertyDetails
dataBridgeIncluded
propertyViewport
db_upgraded
propertyRates
locationsRegions
rentivoWidgets
propertyRooms
...

Browser metrics Passed 4 tests

Checking browser requirements for Rentivo Widgets
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲18313.57 ▼0.811.92 ▲0.2246.72 ▲7.83
Dashboard /wp-admin2,261 ▲735.29 ▲0.24105.25 ▼4.0540.99 ▼3.37
Posts /wp-admin/edit.php2,128 ▲392.50 ▲0.4942.20 ▲0.5732.51 ▼1.39
Add New Post /wp-admin/post-new.php1,562 ▲4317.94 ▼5.10665.37 ▲55.8735.84 ▼12.39
Media Library /wp-admin/upload.php1,446 ▲554.61 ▲0.36100.60 ▼5.4742.54 ▼1.13
Settings /wp-admin/admin.php?page=rentivo-settings1,3442.9361.2029.95
Rentivo Widgets /wp-admin/admin.php?page=rentivo-index4,5732.3232.1888.95

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/rentivo-widgets/framework/shared.php+34
    Function get_magic_quotes_gpc() is deprecated
  • This plugin does not fully uninstall, leaving 10 options in the database
    • rentivoWidgets
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • rentivoSettings
    • widget_recent-comments
    • widget_theysaidso_widget
    • rentivoWidgetsGeneral
    • dataBridgeIncluded
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rentivo-index
    • > Deprecated in wp-content/plugins/rentivo-widgets/framework/shared.php+34
    Function get_magic_quotes_gpc() is deprecated
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rentivo-index
    • > User deprecated in wp-content/plugins/rentivo-widgets/vendor/twig/twig/lib/Twig/Extension/Escaper.php+56
    Using "true" as the default strategy is deprecated since version 1.21. Use "html" instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 231× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig_LoaderInterface' not found in wp-content/plugins/rentivo-widgets/vendor/twig/twig/lib/Twig/Loader/Chain.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Test_NodeTestCase' not found in wp-content/plugins/rentivo-widgets/vendor/twig/twig/test/Twig/Tests/Node/TextTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node' not found in wp-content/plugins/rentivo-widgets/vendor/twig/twig/lib/Twig/Node/If.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Filter' not found in wp-content/plugins/rentivo-widgets/vendor/twig/twig/lib/Twig/Node/Expression/Filter/Default.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig_LoaderInterface' not found in wp-content/plugins/rentivo-widgets/vendor/twig/twig/lib/Twig/Loader/String.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node' not found in wp-content/plugins/rentivo-widgets/vendor/twig/twig/lib/Twig/Node/SetTemp.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __autoload() in wp-content/plugins/rentivo-widgets/app/panels.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __autoload() in wp-content/plugins/rentivo-widgets/app/meta.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/rentivo-widgets/app/activate.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Binary' not found in wp-content/plugins/rentivo-widgets/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Less.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (Rentivo Widgets admin interface screenshot-1.png)
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === rentivo-widgets === )
You can look at the official readme.txt

rentivo-widgets/plugin.php 92% from 13 tests

The main PHP script in "Rentivo Widgets" version 0.0.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("rentivo-widgets.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected20,145 lines of code in 417 files:
LanguageFilesBlank linesComment linesLines of code
PHP2863,4306,46115,129
reStructuredText882,2852,0303,161
C1161174792
CSS36531324
JavaScript55162279
Twig17340258
JSON200111
YAML17131
XML12023
HTML110017
C/C++ Header171315
m41215

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity5.65
▷ Minimum class complexity1.00
▷ Maximum class complexity122.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces1
Interfaces22
Traits0
Classes273
▷ Abstract classes145.13%
▷ Concrete classes25994.87%
▷ Final classes00.00%
Methods1,291
▷ Static methods131.01%
▷ Public methods1,14488.61%
▷ Protected methods13010.07%
▷ Private methods171.32%
Functions76
▷ Named functions6585.53%
▷ Anonymous functions1114.47%
Constants47
▷ Global constants48.51%
▷ Class constants4391.49%
▷ Public constants43100.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.66MB with 0.54MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png337.81KB123.59KB▼ 63.41%
(invalid) resources/img/widgets/screenshot-1.png340.76KB0.00KB▼ 100.00%