83% custom-author-box

Code Review | Custom Author Box

WordPress plugin Custom Author Box scored83%from 54 tests.

About plugin

  • Plugin page: custom-author-box
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3
  • WordPress version: 6.3.1
  • First release: Jun 21, 2017
  • Latest release: Jun 22, 2017
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: mehranumr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /586 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼4.21ms] Passed 4 tests

An overview of server-side resources used by Custom Author Box
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.34 ▼0.30
Dashboard /wp-admin3.31 ▼0.0349.75 ▼11.61
Posts /wp-admin/edit.php3.36 ▲0.0144.90 ▼3.14
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.88 ▲1.85
Media Library /wp-admin/upload.php3.24 ▲0.0134.06 ▼1.79

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Author Box
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼1.321.81 ▼0.0843.13 ▼2.03
Dashboard /wp-admin2,209 ▲215.85 ▼0.0298.94 ▼19.3839.10 ▼5.81
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0337.44 ▲2.7233.51 ▲0.51
Add New Post /wp-admin/post-new.php1,527 ▼123.59 ▲5.46601.80 ▼47.7853.81 ▲4.15
Media Library /wp-admin/upload.php1,388 ▲64.27 ▲0.0497.28 ▼4.0344.04 ▲1.37

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_ab_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_image_size() in wp-content/plugins/custom-author-box/custom-author-box.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

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
Please fix the following attributes: Please take inspiration from this readme.txt

custom-author-box/custom-author-box.php 85% from 13 tests

The entry point to "Custom Author Box" version 0.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 159 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin169 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1682169

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity5.33
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
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
11 PNG files occupy 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/square.png0.86KB0.10KB▼ 87.98%
inc/Star.png9.25KB3.85KB▼ 58.40%
inc/oval.png1.72KB1.05KB▼ 39.00%
inc/circle.png9.78KB4.92KB▼ 49.71%
inc/Rounded-Corner.png6.70KB3.06KB▼ 54.31%