10% wp-bing-background

Code Review | WP Bing Background

WordPress plugin WP Bing Background scored 10% from 54 tests.

About plugin

  • Plugin page: wp-bing-background
  • Plugin version: 1.1.4
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4
  • WordPress version: 6.3.1
  • First release: May 7, 2020
  • Latest release: May 20, 2020
  • Number of updates: 4
  • Update frequency: every 3.3 days
  • Top authors: joytou (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 391 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/wp-bing-background/includes/lessc.inc.php+717
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.09MB] [CPU: ▼54.68ms] Passed 4 tests

Analyzing server-side resources used by WP Bing Background
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.90 ▼0.568.78 ▼36.71
Dashboard /wp-admin2.92 ▼0.388.42 ▼41.33
Posts /wp-admin/edit.php2.92 ▼0.438.03 ▼53.80
Add New Post /wp-admin/post-new.php2.92 ▼2.978.70 ▼86.86
Media Library /wp-admin/upload.php2.92 ▼0.3110.24 ▼26.35
WP Bing Background /wp-admin/options-general.php?page=wp-bing-background2.929.89

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
wp_bing_background_options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

WP Bing Background: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7713.28 ▼1.081.77 ▼0.7238.40 ▼5.31
Dashboard /wp-admin2,212 ▲274.84 ▼1.06104.42 ▲4.6236.28 ▼8.26
Posts /wp-admin/edit.php2,095 ▼12.05 ▼0.1239.88 ▼9.2734.34 ▼6.70
Add New Post /wp-admin/post-new.php1,536 ▲2221.00 ▲3.62662.37 ▼25.1066.12 ▲18.20
Media Library /wp-admin/upload.php1,397 ▲64.22 ▲0.03106.88 ▲6.6747.33 ▲0.42
WP Bing Background /wp-admin/options-general.php?page=wp-bing-background9222.0425.2825.28

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/wp-bing-background/includes/lessc.inc.php+717
    Array and string offset access syntax with curly braces is deprecated
  • The plugin did not uninstall successfully, leaving 10 files (0.15MB) in the plugin directory
    • (new file) wp-bing-background.php
    • (new file) css/style.less
    • (new file) includes/lessc.inc.php
    • (new file) includes/imgcompress.class.php
    • (new file) languages/wp-bing-background-zh_CN.mo
    • (new file) languages/wp-bing-background.pot
    • (new file) js/myScript.js
    • (new file) index.php
    • (new file) languages/wp-bing-background-zh_CN.po
    • (new file) readme.txt
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • wp_bing_background_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-bing-background
    • > Deprecated in wp-content/plugins/wp-bing-background/includes/lessc.inc.php+2478
    Array and string offset access syntax with curly braces is deprecated
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-bing-background
    • > Warning in wp-content/plugins/wp-bing-background/wp-bing-background.php+521
    mkdir(): No such file or directory
    • > GET request to /wp-admin/options-general.php?page=wp-bing-background
    • > Warning in wp-content/plugins/wp-bing-background/wp-bing-background.php+434
    opendir(wp-content/uploads/bing/images): failed to open dir: No such file or directory
    • > GET request to /wp-admin/options-general.php?page=wp-bing-background
    • > Warning in wp-content/plugins/wp-bing-background/wp-bing-background.php+468
    fopen(wp-content/uploads/bing/images/b27db2590319861c0f72cf9035b50e21.jpg): failed to open stream: No such file or directory
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-bing-background
    • > Warning in wp-content/plugins/wp-bing-background/wp-bing-background.php+561
    fwrite() expects parameter 1 to be resource, bool given
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-bing-background
    • > Warning in wp-content/plugins/wp-bing-background/wp-bing-background.php+562
    fclose() expects parameter 1 to be resource, bool given
    • > GET request to /wp-admin/options-general.php?page=wp-bing-background
    • > Warning in wp-content/plugins/wp-bing-background/wp-bing-background.php+560
    fopen(wp-content/uploads/bing/css/style.css): failed to open stream: No such file or directory

SRP 50% 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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-bing-background/wp-bing-background.php:718

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: background, wordpress, bing, image

wp-bing-background/wp-bing-background.php Passed 13 tests

The main PHP script in "WP Bing Background" version 1.1.4 is automatically included on every request by WordPress
70 characters long description:
Change the wordpress's background to the image which provided by Bing.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected3,456 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP46935733,261
PO File16160165
JavaScript11918
LESS16012

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity103.71
▷ Minimum class complexity1.00
▷ Maximum class complexity352.00
Average method complexity4.69
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods195
▷ Static methods2010.26%
▷ Public methods5025.64%
▷ Protected methods14172.31%
▷ Private methods42.05%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin