84% byte-php-code

Code Review | Byte's PHP Code Widget

WordPress plugin Byte's PHP Code Widget scored84%from 54 tests.

About plugin

  • Plugin page: byte-php-code
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.7.1
  • WordPress version: 6.3.1
  • First release: Nov 12, 2013
  • Latest release: Nov 12, 2013
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: ByteEnable (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,145 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
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.24ms] Passed 4 tests

A check of server-side resources used by Byte's PHP Code Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0539.64 ▼0.27
Dashboard /wp-admin3.36 ▲0.0561.28 ▲9.87
Posts /wp-admin/edit.php3.41 ▲0.0549.91 ▼0.29
Add New Post /wp-admin/post-new.php5.94 ▲0.0586.63 ▼17.32
Media Library /wp-admin/upload.php3.28 ▲0.0538.09 ▲0.92

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 10 new options
New WordPress options
bytes_before_post_bool
bytes_post_code
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_wp_vxbeyz_code_widget
widget_theysaidso_widget
widget_recent-comments
bytes_after_post_bool
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Byte's PHP Code Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.39 ▼0.141.68 ▲0.0940.25 ▼5.30
Dashboard /wp-admin2,198 ▲185.66 ▼0.0285.33 ▼0.7840.22 ▼3.00
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0735.98 ▼5.8237.39 ▼3.32
Add New Post /wp-admin/post-new.php1,526 ▼023.09 ▼0.53664.02 ▼43.0464.96 ▲4.11
Media Library /wp-admin/upload.php1,397 ▼34.24 ▲0.06103.74 ▼4.6046.25 ▼2.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_wp_vxbeyz_code_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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 errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/byte-php-code/bytes-php-code.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (The screenshot description corresponds to screenshot-1.jpg.) image not found
The official readme.txt is a good inspiration

byte-php-code/bytes-php-code.php 92% from 13 tests

The main PHP file in "Byte's PHP Code Widget" ver. 0.4 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("byte-php-code.php" instead of "bytes-php-code.php")

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
Everything looks great! No dangerous files found in this plugin252 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23155252

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected