84% freetobook-review-widget

Code Review | Freetobook review widget (legacy)

WordPress plugin Freetobook review widget (legacy) scored84%from 54 tests.

About plugin

  • Plugin page: freetobook-review...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.7
  • WordPress version: 6.3.1
  • First release: Feb 7, 2018
  • Latest release: Oct 8, 2021
  • Number of updates: 10
  • Update frequency: every 133.9 days
  • Top authors: freetobook (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,742 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.69ms] Passed 4 tests

Analyzing server-side resources used by Freetobook review widget (legacy)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.74 ▼0.86
Dashboard /wp-admin3.32 ▲0.0249.95 ▼5.39
Posts /wp-admin/edit.php3.37 ▲0.0250.35 ▼1.12
Add New Post /wp-admin/post-new.php5.90 ▲0.0288.04 ▼3.39
Media Library /wp-admin/upload.php3.25 ▲0.0237.46 ▲3.86
Freetobook Review Widget /wp-admin/options-general.php?page=freetobook-review-widget/freetobook-review-widget.php3.2241.56

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_freetobook_reviews

Browser metrics Passed 4 tests

Checking browser requirements for Freetobook review widget (legacy)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9413.44 ▼0.951.98 ▲0.1737.02 ▼10.86
Dashboard /wp-admin2,213 ▲254.92 ▼0.90108.48 ▲5.7140.38 ▼1.91
Posts /wp-admin/edit.php2,098 ▲62.21 ▲0.1635.21 ▼5.3532.80 ▼4.57
Add New Post /wp-admin/post-new.php1,542 ▲2223.36 ▲0.26655.43 ▼4.1349.13 ▼1.00
Media Library /wp-admin/upload.php1,398 ▲104.20 ▲0.0098.57 ▼7.5243.06 ▼4.23
Freetobook Review Widget /wp-admin/options-general.php?page=freetobook-review-widget/freetobook-review-widget.php7941.8025.8227.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_freetobook_reviews
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/freetobook-review-widget/freetobook-review-widget.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: booking system, online booking, booking engine, web booking, freetobook...

freetobook-review-widget/freetobook-review-widget.php Passed 13 tests

The principal PHP file in "Freetobook review widget (legacy)" v. 1.1 is loaded by WordPress automatically on each request
47 characters long description:
Freetobook Review Widget for wordpress (legacy)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin278 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP16619216
JavaScript121161
CSS1151

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.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
20 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png0.20KB0.08KB▼ 57.56%
css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png0.34KB0.16KB▼ 54.02%
css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png0.30KB0.15KB▼ 49.68%
css/ui-lightness/images/ui-icons_ffd27a_256x240.png4.44KB4.17KB▼ 6.02%
images/previews/combined.png9.79KB4.16KB▼ 57.48%