78% credit-line-generator

Code Review | Credit Line Generator

WordPress plugin Credit Line Generator scored78%from 54 tests.

About plugin

  • Plugin page: credit-line-gener...
  • Plugin version: 0.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.3
  • WordPress version: 6.3.1
  • First release: Jun 2, 2012
  • Latest release: Oct 11, 2023
  • Number of updates: 43
  • Update frequency: every 96.6 days
  • Top authors: hatesspam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,160 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

Analyzing server-side resources used by Credit Line Generator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.91 ▼5.05
Dashboard /wp-admin3.32 ▼0.0249.24 ▼14.65
Posts /wp-admin/edit.php3.37 ▲0.0250.94 ▲1.35
Add New Post /wp-admin/post-new.php5.92 ▲0.0495.29 ▼20.04
Media Library /wp-admin/upload.php3.25 ▲0.0239.38 ▲4.35
Credit Line Generator /wp-admin/options-general.php?page=credit_line_generator3.1935.80

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Credit Line Generator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,934 ▲17314.61 ▲0.251.66 ▼0.3040.04 ▼8.10
Dashboard /wp-admin2,340 ▲1635.65 ▼0.0290.41 ▼0.3441.98 ▼0.57
Posts /wp-admin/edit.php2,247 ▲1502.05 ▲0.0839.11 ▲2.6636.08 ▲1.66
Add New Post /wp-admin/post-new.php1,670 ▲13523.31 ▲4.87606.26 ▼81.3651.79 ▼16.94
Media Library /wp-admin/upload.php1,547 ▲1474.12 ▼0.0998.44 ▲2.3443.61 ▼1.38
Credit Line Generator /wp-admin/options-general.php?page=credit_line_generator9702.1724.5632.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=credit_line_generator
    • > Notice in wp-content/plugins/credit-line-generator/options.php+51
    Trying to access array offset on value of type bool

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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/credit-line-generator/options.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/credit-line-generator/creditline.php:29

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can look at the official readme.txt

credit-line-generator/creditline.php 85% from 13 tests

The principal PHP file in "Credit Line Generator" v. 0.3.3 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("credit-line-generator.php" instead of "creditline.php")

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
No dangerous file extensions were detected659 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP27771314
JavaScript22212145
PO File1264886
SVG11176
CSS11138

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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