84% pco-image-widget-field

Code Review | PCo Image Widget Field

WordPress plugin PCo Image Widget Field scored84%from 54 tests.

About plugin

  • Plugin page: pco-image-widget-...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9.2
  • WordPress version: 6.3.1
  • First release: Aug 7, 2013
  • Latest release: Jan 29, 2018
  • Number of updates: 28
  • Update frequency: every 58.5 days
  • Top authors: Compute (96.43%)PeytzCo (7.14%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /8,056 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.14ms] Passed 4 tests

An overview of server-side resources used by PCo Image Widget Field
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.94 ▼7.84
Dashboard /wp-admin3.33 ▲0.0250.50 ▼2.71
Posts /wp-admin/edit.php3.38 ▲0.0248.96 ▼7.53
Add New Post /wp-admin/post-new.php5.91 ▲0.0297.55 ▼6.40
Media Library /wp-admin/upload.php3.25 ▲0.0239.29 ▼2.80

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for PCo Image Widget Field
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9014.22 ▼0.132.42 ▲0.0852.57 ▲7.31
Dashboard /wp-admin2,203 ▲185.80 ▲0.8999.92 ▼17.9741.00 ▼8.05
Posts /wp-admin/edit.php2,092 ▲242.05 ▲0.0541.72 ▲3.0239.17 ▲4.09
Add New Post /wp-admin/post-new.php1,533 ▲1423.29 ▲0.05640.97 ▼62.94102.77 ▲35.12
Media Library /wp-admin/upload.php1,385 ▼64.18 ▲0.10101.89 ▼20.9644.19 ▼1.12

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/pco-image-widget-field/pco-image-widget-field.php:105

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: image, widget, upload

pco-image-widget-field/pco-image-widget-field.php Passed 13 tests

"PCo Image Widget Field" version 1.1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
62 characters long description:
An easy way to add an image field to your custom build widget.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin264 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript13240104
PHP117884
PO File2121254
CSS15022

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.12
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin