84% server-response

Code Review | Server Response

WordPress plugin Server Response scored84%from 54 tests.

About plugin

  • Plugin page: server-response
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.8.1
  • WordPress version: 6.3.1
  • First release: Nov 2, 2016
  • Latest release: Aug 4, 2017
  • Number of updates: 3
  • Update frequency: every 92.0 days
  • Top authors: seoriver (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /925 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.01MB] [CPU: ▼9.84ms] Passed 4 tests

A check of server-side resources used by Server Response
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.61 ▼4.56
Dashboard /wp-admin3.32 ▼0.0247.83 ▼11.26
Posts /wp-admin/edit.php3.37 ▲0.0250.69 ▲1.07
Add New Post /wp-admin/post-new.php5.90 ▲0.0280.77 ▼23.45
Media Library /wp-admin/upload.php3.25 ▲0.0234.07 ▼0.07
Server Response /wp-admin/options-general.php?page=server-response/server-response.php3.2132.97

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Server Response
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.31 ▼1.071.71 ▼0.2244.30 ▲1.42
Dashboard /wp-admin2,213 ▲224.85 ▼1.05104.84 ▲0.5239.45 ▼6.90
Posts /wp-admin/edit.php2,096 ▲72.01 ▲0.0038.95 ▼5.7735.19 ▼3.08
Add New Post /wp-admin/post-new.php1,536 ▲323.27 ▲0.11665.55 ▲35.4459.27 ▲4.11
Media Library /wp-admin/upload.php1,395 ▲44.15 ▼0.0595.06 ▼6.5045.03 ▲2.92
Server Response /wp-admin/options-general.php?page=server-response/server-response.php8482.0222.4527.42

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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 fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/server-response/server-response.php:14

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Настройки плагина в панели администрирования.)
Please take inspiration from this readme.txt

server-response/server-response.php Passed 13 tests

"Server Response" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
109 characters long description:
Корректировка заголовков ответа сервера и отключение REST API.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin67 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1201867

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin