10% report-an-error

Code Review | Report an error

WordPress plugin Report an error scored10%from 54 tests.

About plugin

  • Plugin page: report-an-error
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.4
  • WordPress version: 6.3.1
  • First release: Oct 14, 2014
  • Latest release: Nov 26, 2015
  • Number of updates: 7
  • Update frequency: every 58.3 days
  • Top authors: ortox (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active /1,543 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/report-an-error/report-an-error.php+18
    Function create_function() is deprecated

Server metrics [RAM: ▼1.85MB] [CPU: ▼50.69ms] Passed 4 tests

An overview of server-side resources used by Report an error
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼1.335.30 ▼37.35
Dashboard /wp-admin2.15 ▼1.156.83 ▼38.45
Posts /wp-admin/edit.php2.16 ▼1.206.15 ▼38.02
Add New Post /wp-admin/post-new.php2.15 ▼3.735.92 ▼88.92
Media Library /wp-admin/upload.php2.16 ▼1.076.52 ▼25.95
Report an error /wp-admin/options-general.php?page=report_an_error2.165.86

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_report_an_error
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Report an error
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲13413.48 ▼0.809.04 ▲7.4344.62 ▲6.83
Dashboard /wp-admin2,196 ▲195.55 ▼0.1184.65 ▼1.1339.83 ▼3.70
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0134.68 ▼1.6633.81 ▼3.50
Add New Post /wp-admin/post-new.php1,534 ▼023.24 ▲0.09617.51 ▼24.9749.66 ▼11.35
Media Library /wp-admin/upload.php1,407 ▲74.21 ▲0.0199.31 ▲5.5545.63 ▲4.26
Report an error /wp-admin/options-general.php?page=report_an_error7892.0022.8324.55

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/report-an-error/report-an-error.php+18
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_report_an_error
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=report_an_error
    • > Deprecated in wp-content/plugins/report-an-error/report-an-error.php+18
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=report_an_error
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/report-an-error/inc/class.widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/report-an-error/report-an-error.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: report, error, prihodru, widget, typo

report-an-error/report-an-error.php Passed 13 tests

The principal PHP file in "Report an error" v. 1.0.1 is loaded by WordPress automatically on each request
115 characters long description:
Cообщения об опечатках или ошибках, замеченных на ваших сайтах.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin482 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP37030303
PO File26774179

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity13.00
▷ Minimum class complexity7.00
▷ Maximum class complexity19.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods220.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.11MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png14.88KB5.59KB▼ 62.45%
screenshot-3.png45.09KB16.79KB▼ 62.76%
screenshot-2.png55.56KB22.45KB▼ 59.60%