84% interserve-data-feed

Code Review | Interserve Data Feeds

WordPress plugin Interserve Data Feeds scored 84% from 54 tests.

About plugin

  • Plugin page: interserve-data-feed
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-5.2.3
  • WordPress version: 6.3.1
  • First release: Oct 29, 2014
  • Latest release: Sep 30, 2019
  • Number of updates: 24
  • Update frequency: every 75.1 days
  • Top authors: itmatio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 874 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.22MB] [CPU: ▲3.90ms] Passed 4 tests

This is a short check of server-side resources used by Interserve Data Feeds
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2541.04 ▲3.15
Dashboard /wp-admin3.54 ▲0.2448.15 ▲2.68
Posts /wp-admin/edit.php3.59 ▲0.2453.08 ▲6.82
Add New Post /wp-admin/post-new.php6.06 ▲0.1792.56 ▲8.91
Media Library /wp-admin/upload.php3.45 ▲0.2236.37 ▲2.95
Interserve Data /wp-admin/options-general.php?page=isdata3.3736.47

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 35 new files
Database: no new tables, 9 new options
New WordPress options
widget_isdata_storywidget
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_isdata_childpageswidget
widget_isdata_jobwidget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Interserve Data Feeds
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲1513.25 ▼1.591.77 ▼0.0244.57 ▼0.95
Dashboard /wp-admin2,207 ▼25.77 ▲0.9096.94 ▼3.3341.77 ▲1.75
Posts /wp-admin/edit.php2,093 ▲12.14 ▲0.1340.14 ▲5.7541.15 ▲8.87
Add New Post /wp-admin/post-new.php1,545 ▲3118.27 ▲0.72641.66 ▼28.0161.51 ▼9.77
Media Library /wp-admin/upload.php1,392 ▲44.24 ▼0.02105.31 ▼8.9247.00 ▼2.37
Interserve Data /wp-admin/options-general.php?page=isdata8602.0528.0330.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_isdata_childpageswidget
    • widget_recent-posts
    • widget_isdata_jobwidget
    • widget_isdata_storywidget
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 40× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      Use of undefined constant ISDATA_PATH - assumed 'ISDATA_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/interserve-data-feed/test/isdata/ManagerTest.php on line 11
    • > PHP Warning
      Use of undefined constant ISDATA_PATH - assumed 'ISDATA_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/interserve-data-feed/test/isdata/FeedMock.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/interserve-data-feed/isdata.php:13
    • > PHP Warning
      require_once(ISDATA_PATHFeed.php): failed to open stream: No such file or directory in wp-content/plugins/interserve-data-feed/test/isdata/FeedMock.php on line 11
    • > PHP Warning
      require_once(ISDATA_PATHFeed.php): failed to open stream: No such file or directory in wp-content/plugins/interserve-data-feed/test/isdata/FeedMock.php on line 11
    • > PHP Fatal error
      require_once(): Failed opening required 'ISDATA_PATHFeed.php' (include_path='.:/usr/share/php') in wp-content/plugins/interserve-data-feed/test/isdata/FeedMock.php on line 11
    • > PHP Warning
      require_once(ISDATA_PATHFeed.php): failed to open stream: No such file or directory in wp-content/plugins/interserve-data-feed/test/isdata/FeedMock.php on line 11
    • > PHP Fatal error
      require_once(): Failed opening required 'ISDATA_PATHFeed.php' (include_path='.:/usr/share/php') in wp-content/plugins/interserve-data-feed/test/isdata/FeedMock.php on line 11
    • > PHP Warning
      require_once(ISDATA_PATHFeed.php): failed to open stream: No such file or directory in wp-content/plugins/interserve-data-feed/test/isdata/FeedMock.php on line 11
    • > PHP Fatal error
      require_once(): Failed opening required 'ISDATA_PATHManager.php' (include_path='.:/usr/share/php') in wp-content/plugins/interserve-data-feed/test/isdata/ManagerTest.php on line 11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === interserve-data-feed === )
The official readme.txt is a good inspiration

interserve-data-feed/isdata.php 92% from 13 tests

The main file in "Interserve Data Feeds" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("interserve-data-feed.php" instead of "isdata.php")

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 plugin2,691 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP324201,1252,677
XML10114

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity10.07
▷ Minimum class complexity1.00
▷ Maximum class complexity68.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes30
▷ Abstract classes413.33%
▷ Concrete classes2686.67%
▷ Final classes00.00%
Methods186
▷ Static methods10.54%
▷ Public methods17795.16%
▷ Protected methods00.00%
▷ Private methods94.84%
Functions10
▷ Named functions110.00%
▷ Anonymous functions990.00%
Constants37
▷ Global constants513.51%
▷ Class constants3286.49%
▷ Public constants32100.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
There were not PNG files found in your plugin