78% datafeedr-api

Code Review | Datafeedr API

WordPress plugin Datafeedr API scored78%from 54 tests.

About plugin

  • Plugin page: datafeedr-api
  • Plugin version: 1.3.16
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8+
  • WordPress version: 6.3.1
  • First release: Feb 2, 2014
  • Latest release: Nov 10, 2023
  • Number of updates: 429
  • Update frequency: every 8.3 days
  • Top authors: datafeedr.com (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

5,000+ active /196,274 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲1.33MB] [CPU: ▲5.16ms] Passed 4 tests

An overview of server-side resources used by Datafeedr API
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.56 ▲1.1039.27 ▲1.96
Dashboard /wp-admin4.72 ▲1.3755.35 ▼4.18
Posts /wp-admin/edit.php4.83 ▲1.4756.11 ▲13.76
Add New Post /wp-admin/post-new.php7.32 ▲1.43100.19 ▲15.37
Media Library /wp-admin/upload.php4.64 ▲1.4144.30 ▲9.09

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Datafeedr API
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7814.59 ▲0.261.72 ▲0.1139.00 ▼2.30
Dashboard /wp-admin2,233 ▲565.66 ▲0.0188.31 ▼3.0841.54 ▼2.62
Posts /wp-admin/edit.php2,138 ▲352.06 ▲0.0539.76 ▲3.0734.12 ▲1.02
Add New Post /wp-admin/post-new.php1,559 ▲3323.29 ▲0.11688.36 ▼7.0636.83 ▼14.71
Media Library /wp-admin/upload.php1,435 ▲354.27 ▲0.13102.18 ▼11.3546.83 ▲0.67

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-posts
    • dfrapi_version
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • dfrapi_usage_notification_tracker

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/datafeedr-api/js/helpscout-beacon.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Trait 'Datafeedr_Timer' not found in wp-content/plugins/datafeedr-api/classes/class-datafeedr-image-importer.php on line 37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/datafeedr-api/datafeedr-api.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tested up to: The plugin version is formatted incorrectly
The official readme.txt might help

datafeedr-api/datafeedr-api.php Passed 13 tests

This is the main PHP file of "Datafeedr API" version 1.3.16, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
61 characters long description:
Connect to the Datafeedr API and configure your API settings.

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
Everything looks great! No dangerous files found in this plugin7,773 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP341,6943,3246,427
CSS215828897
JavaScript59640436
SVG10013

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity14.17
▷ Minimum class complexity1.00
▷ Maximum class complexity135.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity64.00
Code structure
Namespaces0
Interfaces0
Traits1
Classes34
▷ Abstract classes00.00%
▷ Concrete classes34100.00%
▷ Final classes00.00%
Methods324
▷ Static methods92.78%
▷ Public methods27986.11%
▷ Protected methods3711.42%
▷ Private methods82.47%
Functions154
▷ Named functions15097.40%
▷ Anonymous functions42.60%
Constants28
▷ Global constants1967.86%
▷ Class constants932.14%
▷ Public constants9100.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
6 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icons/help.png0.77KB0.82KB0.00%
images/icons/removefilter.png0.64KB0.56KB▼ 12.65%
images/icons/addfilter.png0.67KB0.56KB▼ 16.23%
images/icons/noimage.png2.75KB2.92KB0.00%
images/networks/30x30/custom.png2.48KB1.73KB▼ 30.15%