83% wopo-web-screensaver

Code Review | WoPo Web Screensaver

WordPress plugin WoPo Web Screensaver scored83%from 54 tests.

About plugin

  • Plugin page: wopo-web-screensaver
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8
  • WordPress version: 6.3.1
  • First release: Aug 4, 2021
  • Latest release: Aug 4, 2021
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: thanhbinh8703 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /298 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

A check of server-side resources used by WoPo Web Screensaver
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.19 ▼0.17
Dashboard /wp-admin3.31 ▲0.0143.76 ▼2.30
Posts /wp-admin/edit.php3.36 ▲0.0139.52 ▼11.08
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.56 ▼22.25
Media Library /wp-admin/upload.php3.23 ▲0.0134.53 ▲0.75

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

WoPo Web Screensaver: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.26 ▼1.042.00 ▲0.3144.37 ▼0.34
Dashboard /wp-admin2,203 ▲155.86 ▼0.0399.08 ▲0.0540.38 ▼2.33
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0235.74 ▼5.9431.35 ▼3.69
Add New Post /wp-admin/post-new.php1,533 ▲1923.20 ▲5.60655.51 ▼8.3554.42 ▼1.03
Media Library /wp-admin/upload.php1,388 ▼34.22 ▼0.0198.05 ▲2.2341.04 ▼5.49

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wopo-web-screensaver/wopo-web-screensaver.php:21

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 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt might help

wopo-web-screensaver/wopo-web-screensaver.php 77% from 13 tests

The primary PHP file in "WoPo Web Screensaver" version 1.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Requires PHP: Required version must match the one declared in readme.txt ("5.2.4" instead of "7.1")
  • Requires at least: Required version must match the one declared in readme.txt ("4.6" instead of "5.2")
  • Domain Path: The domain path folder was not found ("/languages")

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 plugin3,480 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript66362922,507
JSON300713
HTML104163
Markdown141045
PHP141429
CSS10023

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions3
▷ Named functions3100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.51MB with 0.18MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
html/app/images/meta/icon-32x32.png0.42KB0.26KB▼ 38.14%
html/app/images/textures/candycane.png0.53KB0.39KB▼ 26.33%
html/app/images/meta/icon-16x16.png0.25KB0.19KB▼ 25.77%
html/app/images/textures/rusty.png518.93KB249.70KB▼ 51.88%