71% wordpress-booklooker-bot

Code Review | WordPress Booklooker-bot

WordPress plugin WordPress Booklooker-bot scored71%from 54 tests.

About plugin

  • Plugin page: wordpress-bookloo...
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 4, 2012
  • Latest release: Jul 5, 2016
  • Number of updates: 227
  • Update frequency: every 7.3 days
  • Top authors: madmonk111 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,784 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by WordPress Booklooker-bot
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.88 ▼4.82
Dashboard /wp-admin3.33 ▲0.0251.52 ▲1.72
Posts /wp-admin/edit.php3.38 ▲0.0251.22 ▲1.28
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.92 ▼14.72
Media Library /wp-admin/upload.php3.27 ▲0.0433.55 ▼1.82
Booklooker-bot Optionen /wp-admin/plugins.php?page=bookbotpl3.2834.48

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 385 new files
Database: no new tables, 48 new options
New WordPress options
booklook_sparte5
booklook_headline3
booklook_uid
booklook_uid2
booklook_uid5
booklook_sparteID2
booklook_uid3
booklook_headline5
booklook_limit5
booklook_sparte4
...

Browser metrics Passed 4 tests

Checking browser requirements for WordPress Booklooker-bot
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6314.34 ▼0.311.97 ▼0.0939.61 ▼3.49
Dashboard /wp-admin2,201 ▲245.65 ▼0.0588.24 ▼0.1442.48 ▼1.27
Posts /wp-admin/edit.php2,106 ▲32.02 ▲0.0535.62 ▼1.1235.67 ▲3.89
Add New Post /wp-admin/post-new.php1,545 ▼023.24 ▲0.33677.86 ▲69.8457.82 ▲1.93
Media Library /wp-admin/upload.php1,406 ▲94.20 ▼0.03114.74 ▲15.1148.66 ▲2.55
Booklooker-bot Optionen /wp-admin/plugins.php?page=bookbotpl1,2652.0639.30102.62

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 48 options
    • booklook_sparteID2
    • booklook_sparteID5
    • booklook_sparte3
    • booklook_limit5
    • theysaidso_admin_options
    • booklook_limit2
    • booklook_limitFrom4
    • prod_id4
    • widget_recent-comments
    • booklook_uid1
    • ...

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 66× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/wordpress-booklooker-bot/bb_incl_games.php
    • > /wp-content/plugins/wordpress-booklooker-bot/assets/wordpress-booklooker-bot/trunk/bb_incl_books.php
    • > /wp-content/plugins/wordpress-booklooker-bot/assets/wordpress-booklooker-bot/trunk/bb_incl_music.php
    • > /wp-content/plugins/wordpress-booklooker-bot/assets/wordpress-booklooker-bot/tags/2.0.1/bb_incl_books.php
    • > /wp-content/plugins/wordpress-booklooker-bot/assets/wordpress-booklooker-bot/trunk/bb_incl_abooks.php
    • > /wp-content/plugins/wordpress-booklooker-bot/wordpress-booklooker-bot/tags/2.0.1/bb_incl_films.php
    • > /wp-content/plugins/wordpress-booklooker-bot/assets/wordpress-booklooker-bot/trunk/mainfunction.php
    • > /wp-content/plugins/wordpress-booklooker-bot/wordpress-booklooker-bot/tags/1.1.0/mainfunction.php
    • > /wp-content/plugins/wordpress-booklooker-bot/wordpress-booklooker-bot/assets/wordpress-booklooker-bot/tags/2.0.1/bb_incl_music.php
    • > /wp-content/plugins/wordpress-booklooker-bot/wordpress-booklooker-bot/tags/2.0.1/bb_incl_games.php
  • 354× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: sparte in wp-content/plugins/wordpress-booklooker-bot/assets/wordpress-booklooker-bot/tags/2.0.1/mainfunction.php on line 58
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wordpress-booklooker-bot/wordpress-booklooker-bot/tags/1.0.6/booklooker_bot.php:20
    • > PHP Notice
      Trying to get property 'Film' of non-object in wp-content/plugins/wordpress-booklooker-bot/assets/wordpress-booklooker-bot/tags/2.0.0/bb_incl_films.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/wordpress-booklooker-bot/wordpress-booklooker-bot/tags/2.0.0/bb_templ_3_form.php:2
    • > PHP Notice
      Trying to get property 'Game' of non-object in wp-content/plugins/wordpress-booklooker-bot/bb_incl_games.php on line 8
    • > PHP Notice
      Undefined variable: xml_data in wp-content/plugins/wordpress-booklooker-bot/bb_incl_abooks.php on line 8
    • > PHP Notice
      Undefined variable: xml_data in wp-content/plugins/wordpress-booklooker-bot/assets/wordpress-booklooker-bot/trunk/bb_incl_music.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wordpress-booklooker-bot/assets/wordpress-booklooker-bot/tags/2.0.1/booklooker_bot.php:557
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/wordpress-booklooker-bot/wordpress-booklooker-bot/assets/wordpress-booklooker-bot/tags/2.0.1/bb_templ_4_form.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wordpress-booklooker-bot/wordpress-booklooker-bot/assets/wordpress-booklooker-bot/tags/1.0.3/booklooker_bot.php:20

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/plugins.php?page=bookbotpl
    • > Network (severe)
    https://button.flattr.com/flattr-badge-large.png - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Requires at least: Version not formatted correctly
  • Screenshots: These screenshots do not have images: #1 (So sieht eine Blogseite mit den Booklookerangeboten aus), #2 (Optionseite von WordPress Booklooker-bot), #3 (Neu in der Version 2.0.0: Infoboxen für Text und Bilder beim Hovern)
The official readme.txt is a good inspiration

wordpress-booklooker-bot/booklooker_bot.php 85% from 13 tests

"WordPress Booklooker-bot" version 2.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 219 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wordpress-booklooker-bot.php" instead of "booklooker_bot.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin5,070 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP383776894,942
CSS1123128

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions192
▷ Named functions192100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
58 PNG files occupy 1.49MB with 0.89MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
book_standard.png16.79KB7.00KB▼ 58.33%
wordpress-booklooker-bot/tags/2.0.1/info_text_96px.png10.64KB4.45KB▼ 58.17%
wordpress-booklooker-bot/tags/2.0.0/info_text_96px.png10.64KB4.45KB▼ 58.17%
music_standard.png10.34KB4.41KB▼ 57.34%
assets/wordpress-booklooker-bot/tags/2.0.0/game_standard.png17.53KB6.24KB▼ 64.42%