78% requestlogic

Code Review | RequestLogic

WordPress plugin RequestLogic scored78%from 54 tests.

About plugin

  • Plugin page: requestlogic
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.7.2
  • WordPress version: 6.3.1
  • First release: Jun 25, 2021
  • Latest release: Jun 25, 2021
  • Number of updates: 3
  • Update frequency: every 5.0 days
  • Top authors: berriesandco (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /320 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.87ms] Passed 4 tests

Server-side resources used by RequestLogic
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0239.23 ▼2.45
Dashboard /wp-admin3.34 ▲0.0346.57 ▼7.04
Posts /wp-admin/edit.php3.39 ▲0.0349.59 ▼1.47
Add New Post /wp-admin/post-new.php5.94 ▲0.0583.49 ▼4.52
Media Library /wp-admin/upload.php3.26 ▲0.0336.36 ▼0.42

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

RequestLogic: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7713.42 ▼0.961.62 ▼0.3443.03 ▲0.43
Dashboard /wp-admin2,214 ▲295.15 ▼0.75112.33 ▼14.1588.56 ▲34.26
Posts /wp-admin/edit.php2,119 ▲302.37 ▲0.3238.32 ▲3.3929.63 ▼5.18
Add New Post /wp-admin/post-new.php1,536 ▲2223.26 ▲5.71756.87 ▲144.4634.01 ▼20.19
Media Library /wp-admin/upload.php1,478 ▲874.35 ▲0.1998.87 ▼1.1867.95 ▲23.03

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/requestlogic/uninstall.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/requestlogic/templates/admin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/requestlogic/requestlogic.php:47

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid url: "-"
The official readme.txt is a good inspiration

requestlogic/requestlogic.php Passed 13 tests

The primary PHP file in "RequestLogic" version 1.0.0 is used by WordPress to initiate all plugin functionality
104 characters long description:
This plugin is a marketing tool used to expand and manage your fan base and learn about their interests.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin264 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP63034123
CSS2196118
JavaScript24623

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods880.00%
▷ Protected methods220.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

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
templates/img/RL_logo_850x200.png12.72KB5.83KB▼ 54.22%
assets/img/logo.png10.29KB0.53KB▼ 94.84%
templates/img/laptop.png32.36KB11.57KB▼ 64.25%