90% php-floating-point-dos-attack-workaround

Code Review | PHP Floating Point DoS Attack Workaround

WordPress plugin PHP Floating Point DoS Attack Workaround scored90%from 54 tests.

About plugin

  • Plugin page: php-floating-poin...
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 1.5-3.4
  • WordPress version: 6.3.1
  • First release: Jan 5, 2011
  • Latest release: May 21, 2012
  • Number of updates: 22
  • Update frequency: every 66.4 days
  • Top authors: SergeyBiryukov (90.91%)nacin (13.64%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,270 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼6.46ms] Passed 4 tests

A check of server-side resources used by PHP Floating Point DoS Attack Workaround
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.18 ▼2.26
Dashboard /wp-admin3.31 ▼0.0442.59 ▼17.57
Posts /wp-admin/edit.php3.36 ▲0.0044.48 ▼1.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.49 ▼4.24
Media Library /wp-admin/upload.php3.23 ▲0.0031.93 ▼1.75

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by PHP Floating Point DoS Attack Workaround
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼1.501.73 ▲0.0837.55 ▼4.10
Dashboard /wp-admin2,206 ▲185.86 ▼0.08107.38 ▼6.3341.39 ▼6.22
Posts /wp-admin/edit.php2,092 ▲32.11 ▼0.0439.16 ▲3.1834.06 ▼2.58
Add New Post /wp-admin/post-new.php1,519 ▼023.29 ▲0.09649.96 ▼27.2850.81 ▼14.42
Media Library /wp-admin/upload.php1,385 ▼34.19 ▲0.0194.00 ▼10.9841.99 ▼4.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: setup, php, system, hosting, security

php-floating-point-dos-attack-workaround/php-floating-point-dos-attack-workaround.php Passed 13 tests

The primary PHP file in "PHP Floating Point DoS Attack Workaround" version 0.2 is used by WordPress to initiate all plugin functionality
109 characters long description:
Prevents 32-bit PHP versions from hanging when processing a request containing 2.2250738585072011e-308 value.

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
There were no executable files found in this plugin17 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12817

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.86
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%
Functions0
▷ Named functions00.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
No PNG images were found in this plugin