83% xtcz-top-box-office

Code Review | XTCZ Top Box Office

WordPress plugin XTCZ Top Box Office scored83%from 54 tests.

About plugin

  • Plugin page: xtcz-top-box-office
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.3
  • WordPress version: 6.3.1
  • First release: Aug 21, 2015
  • Latest release: Aug 26, 2015
  • Number of updates: 9
  • Update frequency: every 0.6 days
  • Top authors: hkp1990 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /1,973 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.13MB] [CPU: ▼8.84ms] Passed 4 tests

An overview of server-side resources used by XTCZ Top Box Office
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1338.24 ▼10.35
Dashboard /wp-admin3.44 ▲0.0949.98 ▼27.86
Posts /wp-admin/edit.php3.55 ▲0.2055.15 ▼0.55
Add New Post /wp-admin/post-new.php6.04 ▲0.1599.45 ▲3.39
Media Library /wp-admin/upload.php3.36 ▲0.1342.75 ▲7.31
XTCZ Box Office /wp-admin/options-general.php?page=xtcz-top-box-office/xtcz-top-boxoffic-movies.php3.3333.90

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 8 new options
New WordPress options
widget_xtcz_boxoffice_widgets
theysaidso_admin_options
widget_xtcz_bollywood_boxoffice_widgets
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for XTCZ Top Box Office
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲5114.24 ▼0.121.75 ▲0.0143.10 ▲0.53
Dashboard /wp-admin2,198 ▲215.56 ▼0.1291.37 ▼3.5037.98 ▼2.24
Posts /wp-admin/edit.php2,106 ▲62.02 ▲0.0541.45 ▲5.5137.08 ▲0.29
Add New Post /wp-admin/post-new.php1,533 ▲723.21 ▲0.10676.39 ▼22.3355.40 ▲0.77
Media Library /wp-admin/upload.php1,406 ▲34.19 ▼0.01112.51 ▲3.0746.84 ▼3.14
XTCZ Box Office /wp-admin/options-general.php?page=xtcz-top-box-office/xtcz-top-boxoffic-movies.php9811.6926.9829.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_xtcz_bollywood_boxoffice_widgets
    • widget_xtcz_boxoffice_widgets
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
Please fix the following
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/xtcz-top-box-office/xtcz-widgets.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/xtcz-top-box-office/xtcz-shortcode.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/xtcz-top-box-office/xtcz-bollywood-shortcode.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/xtcz-top-box-office/xtcz-widgets-bollywood.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/xtcz-top-box-office/xtcz-top-boxoffic-movies.php:251

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% 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 your attention:
  • Donate link: Please fix this invalid url: ""
The official readme.txt might help

xtcz-top-box-office/xtcz-top-boxoffic-movies.php 85% from 13 tests

This is the main PHP file of "XTCZ Top Box Office" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 272 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("xtcz-top-box-office.php" instead of "xtcz-top-boxoffic-movies.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected673 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP518540626
JavaScript14024
CSS11023

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity17.33
▷ Minimum class complexity7.00
▷ Maximum class complexity30.00
Average method complexity3.04
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods28.33%
▷ Public methods2291.67%
▷ Protected methods00.00%
▷ Private methods28.33%
Functions18
▷ Named functions1266.67%
▷ Anonymous functions633.33%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin