68% fetch-lg

Code Review | flg

WordPress plugin flg scored 68% from 54 tests.

About plugin

  • Plugin page: fetch-lg
  • Plugin version: 1...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.1-3.4
  • WordPress version: 6.3.1
  • First release: Nov 30, 2012
  • Latest release: Dec 1, 2012
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: hilflo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 787 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼1.23MB] [CPU: ▼42.01ms] Passed 4 tests

This is a short check of server-side resources used by flg
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.74 ▼0.7213.86 ▼27.87
Dashboard /wp-admin2.78 ▼0.5215.77 ▼32.05
Posts /wp-admin/edit.php2.78 ▼0.5818.89 ▼27.24
Add New Post /wp-admin/post-new.php2.78 ▼3.1117.24 ▼80.89
Media Library /wp-admin/upload.php2.78 ▼0.4514.56 ▼18.05
Fetch lg /wp-admin/options-general.php?page=Createarticle2.7815.02

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

flg: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9613.64 ▼0.731.73 ▼0.2638.72 ▼10.22
Dashboard /wp-admin2,210 ▲195.86 ▲0.79106.01 ▼2.0239.01 ▼9.49
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0239.69 ▲4.9235.16 ▼3.93
Add New Post /wp-admin/post-new.php1,550 ▲1623.30 ▲0.11632.71 ▼40.8348.65 ▼11.93
Media Library /wp-admin/upload.php1,392 ▲44.28 ▼0.0291.89 ▼7.3142.61 ▼4.29
Fetch lg /wp-admin/options-general.php?page=Createarticle8002.0221.5326.38

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
These items require your attention
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5747
    Function load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available.
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=Createarticle
    • > User deprecated in wp-includes/functions.php+5747
    Function load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Createarticle
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=Createarticle
    • > Notice in wp-content/plugins/fetch-lg/create_post.php+4
    Undefined index: add_article
    • > GET request to /wp-admin/options-general.php?page=Createarticle
    • > Notice in wp-content/plugins/fetch-lg/create_post.php+54
    Undefined variable: URL
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Createarticle
    • > Notice in wp-content/plugins/fetch-lg/create_post.php+64
    Undefined index: URL

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
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined index: add_article in wp-content/plugins/fetch-lg/create_post.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fetch-lg/index.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/fetch-lg/create_post.php:48

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === fetch-lg === )
You can look at the official readme.txt

fetch-lg/index.php 85% from 13 tests

"flg" version 1...'s primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Version: Use only periods and digits for the version number (ex. "1.0.3" instead of "1...")
  • Main file name: The principal plugin file should be the same as the plugin slug ("fetch-lg.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
Success! There were no dangerous files found in this plugin252 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3118184
PO File1192558
CSS10010

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin