10% boobook

Code Review | Boobook

WordPress plugin Boobook scored10%from 54 tests.

About plugin

  • Plugin page: boobook
  • Plugin version: 1.21
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Dec 27, 2013
  • Latest release: Oct 17, 2016
  • Number of updates: 23
  • Update frequency: every 44.6 days
  • Top authors: xuxu.fr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,329 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/boobook/widgets/connect.php+5
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Boobook_Connect has a deprecated constructor

Server metrics [RAM: ▼1.85MB] [CPU: ▼52.81ms] Passed 4 tests

An overview of server-side resources used by Boobook
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.324.89 ▼38.16
Dashboard /wp-admin2.16 ▼1.156.66 ▼42.07
Posts /wp-admin/edit.php2.16 ▼1.206.06 ▼39.10
Add New Post /wp-admin/post-new.php2.16 ▼3.736.09 ▼91.91
Media Library /wp-admin/upload.php2.16 ▼1.076.15 ▼27.43
Boobook /wp-admin/options-general.php?page=boobook-page-options2.166.34

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 179 new files
Database: no new tables, 12 new options
New WordPress options
widget_recent-comments
boobook_role_default
boobook_register_notif
theysaidso_admin_options
boobook_logout_redirect
widget_wp_boobook_connect
boobook_logged_redirect
db_upgraded
widget_theysaidso_widget
widget_recent-posts
...

Browser metrics Passed 4 tests

Boobook: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲16614.43 ▲0.0738.15 ▲35.6644.55 ▼2.25
Dashboard /wp-admin2,208 ▲205.84 ▲0.97106.77 ▼8.3440.42 ▼4.78
Posts /wp-admin/edit.php2,097 ▲52.04 ▲0.0339.36 ▲1.7034.37 ▲0.12
Add New Post /wp-admin/post-new.php1,520 ▼1517.35 ▼5.73633.33 ▼8.8449.50 ▼1.00
Media Library /wp-admin/upload.php1,396 ▲114.20 ▼0.0196.61 ▼2.8843.51 ▲0.83
Boobook /wp-admin/options-general.php?page=boobook-page-options9391.6723.8033.19

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/boobook/widgets/connect.php+5
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Boobook_Connect has a deprecated constructor
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=boobook-page-options
    • > Deprecated in wp-content/plugins/boobook/widgets/connect.php+5
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Boobook_Connect has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=boobook-page-options
    • > Deprecated in wp-content/plugins/boobook/boobook.php+40
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=boobook-page-options
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in WP_Boobook_Connect is deprecated since version 4.3.0! Use __construct() instead.

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
Please fix the following items
  • 97× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/boobook/inc/facebook-php-sdk/tests/SignedRequestTest.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\GraphNodes\\GraphNode' not found in wp-content/plugins/boobook/inc/facebook-php-sdk/src/Facebook/GraphNodes/GraphAchievement.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/boobook/inc/facebook-php-sdk/tests/PseudoRandomString/McryptPseudoRandomStringGeneratorTest.php:28
    • > PHP Warning
      require_once(wp-content/plugins/boobook/inc/facebook-php-sdk/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/boobook/inc/facebook-php-sdk/tests/bootstrap.php on line 26
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\Tests\\HttpClients\\AbstractTestHttpClient' not found in wp-content/plugins/boobook/inc/facebook-php-sdk/tests/HttpClients/FacebookStreamHttpClientTest.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/boobook/inc/facebook-php-sdk/tests/GraphNodes/GraphEventTest.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\GraphNodes\\GraphNode' not found in wp-content/plugins/boobook/inc/facebook-php-sdk/src/Facebook/GraphNodes/GraphLocation.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\FacebookClient' not found in wp-content/plugins/boobook/inc/facebook-php-sdk/tests/Authentication/FooFacebookClientForOAuth2Test.php:30
    • > PHP Warning
      require_once(wp-content/plugins/boobook/boobook/library/includes/compat.php): failed to open stream: No such file or directory in wp-content/plugins/boobook/boobook.php on line 31
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\Exceptions\\FacebookSDKException' not found in wp-content/plugins/boobook/inc/facebook-php-sdk/src/Facebook/Exceptions/FacebookResponseException.php:33

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: connect, user, avatar, api, widget...

boobook/boobook.php Passed 13 tests

This is the main PHP file of "Boobook" version 1.21, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
47 characters long description:
Boobook, Another Facebook Connect for WordPress

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 plugin9,647 lines of code in 135 files:
LanguageFilesBlank linesComment linesLines of code
PHP1231,8706,5839,164
Markdown3640232
PO File1272877
JavaScript2112367
JSON10041
YAML27025
XML10022
CSS241219

PHP code Passed 2 tests

An overview 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.14
Average class complexity3.71
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity1.44
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces22
Interfaces5
Traits1
Classes122
▷ Abstract classes32.46%
▷ Concrete classes11997.54%
▷ Final classes00.00%
Methods763
▷ Static methods121.57%
▷ Public methods72094.36%
▷ Protected methods263.41%
▷ Private methods172.23%
Functions34
▷ Named functions2573.53%
▷ Anonymous functions926.47%
Constants29
▷ Global constants26.90%
▷ Class constants2793.10%
▷ Public constants27100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin