84% content-fetcher

Code Review | Content Fetcher

WordPress plugin Content Fetcher scored84%from 54 tests.

About plugin

  • Plugin page: content-fetcher
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 30, 2017
  • Latest release: Jan 8, 2023
  • Number of updates: 23
  • Update frequency: every 89.1 days
  • Top authors: ruhulamin (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /4,896 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.25MB] [CPU: ▼4.97ms] Passed 4 tests

Analyzing server-side resources used by Content Fetcher
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2439.28 ▼0.98
Dashboard /wp-admin3.61 ▲0.2647.33 ▼15.11
Posts /wp-admin/edit.php3.66 ▲0.3049.23 ▲1.21
Add New Post /wp-admin/post-new.php6.13 ▲0.2499.00 ▼5.01
Media Library /wp-admin/upload.php3.47 ▲0.2440.07 ▲5.40

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Content Fetcher
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.70 ▼0.534.37 ▲2.5741.09 ▼2.34
Dashboard /wp-admin2,206 ▲275.91 ▲1.0393.88 ▼8.5538.95 ▼7.62
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0040.14 ▲3.2335.12 ▼2.31
Add New Post /wp-admin/post-new.php1,542 ▲2818.14 ▲0.71608.14 ▼41.2359.89 ▲7.71
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.1397.78 ▲3.6240.89 ▼0.48

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • 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
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/content-fetcher/index.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Not Available) image not found
Please take inspiration from this readme.txt

content-fetcher/index.php 92% from 13 tests

Analyzing the main PHP file in "Content Fetcher" version 1.0.1
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("content-fetcher.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,714 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23573091,714

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity193.50
▷ Minimum class complexity138.00
▷ Maximum class complexity249.00
Average method complexity5.28
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods90
▷ Static methods11.11%
▷ Public methods7583.33%
▷ Protected methods1516.67%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants22
▷ Global constants22100.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
PNG images were not found in this plugin