74% relap

Code Review | Relap - recommendation engine embedded into site

WordPress plugin Relap - recommendation engine embedded into site scored 74% from 54 tests.

About plugin

  • Plugin page: relap
  • Plugin version: 0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.0-4.5.2
  • WordPress version: 6.3.1
  • First release: May 11, 2016
  • Latest release: Jul 21, 2016
  • Number of updates: 21
  • Update frequency: every 4.0 days
  • Top authors: gibbon4ik (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,284 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.53ms] Passed 4 tests

Server-side resources used by Relap - recommendation engine embedded into site
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.28 ▼5.26
Dashboard /wp-admin3.34 ▲0.0446.82 ▼7.21
Posts /wp-admin/edit.php3.39 ▲0.0448.45 ▼1.13
Add New Post /wp-admin/post-new.php5.92 ▲0.0483.19 ▼4.50
Media Library /wp-admin/upload.php3.26 ▲0.0440.23 ▲4.54

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Relap - recommendation engine embedded into site
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5914.48 ▲0.101.70 ▼0.0440.39 ▲2.35
Dashboard /wp-admin2,209 ▲215.91 ▲0.04112.41 ▼5.5343.11 ▼4.55
Posts /wp-admin/edit.php2,089 ▼32.06 ▲0.0939.97 ▲5.3435.94 ▲1.55
Add New Post /wp-admin/post-new.php1,542 ▲518.47 ▼4.58608.83 ▼69.0649.43 ▼0.97
Media Library /wp-admin/upload.php1,388 ▼04.28 ▼0.0396.72 ▼15.0741.25 ▼9.81

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
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/relap/uninstall.php+4
    Constant RELAP_PREFIX already defined
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/relap/relap.php

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: site, content, website, recommendation, ctr...

relap/relap.php 92% from 13 tests

This is the main PHP file of "Relap - recommendation engine embedded into site" version 0.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin290 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP21525141
CSS1110104
PO File1141845

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin