62% image-and-media-byline-credits

Code Review | Image and Media Byline Credits

WordPress plugin Image and Media Byline Credits scored62%from 54 tests.

About plugin

  • Plugin page: image-and-media-b...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.0-5.4.1
  • WordPress version: 6.3.1
  • First release: Jun 3, 2020
  • Latest release: Jun 3, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: devbackroom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /566 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.16MB] [CPU: ▼41.66ms] Passed 4 tests

This is a short check of server-side resources used by Image and Media Byline Credits
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.81 ▼0.6512.40 ▼29.06
Dashboard /wp-admin2.85 ▼0.4521.41 ▼33.85
Posts /wp-admin/edit.php2.85 ▼0.5018.48 ▼28.29
Add New Post /wp-admin/post-new.php2.85 ▼3.0315.57 ▼75.42
Media Library /wp-admin/upload.php2.85 ▼0.3818.50 ▼16.55
Image Byline /wp-admin/tools.php?page=image_byline2.8515.91

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Image and Media Byline Credits
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲17513.77 ▼0.864.73 ▲2.9338.21 ▼7.86
Dashboard /wp-admin2,219 ▲344.95 ▼0.93121.06 ▲12.6344.04 ▲1.17
Posts /wp-admin/edit.php2,105 ▲162.04 ▲0.0743.40 ▲5.9533.84 ▼2.03
Add New Post /wp-admin/post-new.php1,534 ▼118.29 ▼4.70655.04 ▼11.2355.78 ▼4.36
Media Library /wp-admin/upload.php1,404 ▲194.24 ▼0.12100.98 ▼15.9740.70 ▼4.84
Image Byline /wp-admin/tools.php?page=image_byline8692.2333.7333.60

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function WP_Block_Type_Registry::register was called incorrectly. Block type "core/image" is already registered. Please see Debugging in WordPress for more information. (This message was added in version 5.0.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=image_byline
    • > POST request to /wp-admin/admin-ajax.php
    • > User notice in wp-includes/functions.php+5905
    Function WP_Block_Type_Registry::register was called incorrectly. Block type "core/image" is already registered. Please see Debugging in WordPress for more information. (This message was added in version 5.0.0.)

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/image-and-media-byline-credits/public/partials/image-byline-public-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/image-and-media-byline-credits/admin/partials/image-byline-admin-display.php:19

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

image-and-media-byline-credits/image-byline.php 85% from 13 tests

Analyzing the main PHP file in "Image and Media Byline Credits" version 1.0.0
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("image-and-media-byline-credits.php" instead of "image-byline.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin626 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP12171572355
JavaScript42344194
CSS31142
PO File111235

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity3.71
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods38
▷ Static methods25.26%
▷ Public methods3386.84%
▷ Protected methods00.00%
▷ Private methods513.16%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected