84% simple-foaf

Code Review | FoaF

WordPress plugin FoaF scored84%from 54 tests.

About plugin

  • Plugin page: simple-foaf
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0
  • WordPress version: 6.3.1
  • First release: Nov 18, 2011
  • Latest release: May 25, 2022
  • Number of updates: 14
  • Update frequency: every 373.5 days
  • Top authors: pfefferle (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,103 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

Analyzing server-side resources used by FoaF
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0344.43 ▲5.06
Dashboard /wp-admin3.33 ▲0.0249.68 ▼4.66
Posts /wp-admin/edit.php3.38 ▲0.0248.17 ▼1.73
Add New Post /wp-admin/post-new.php5.91 ▲0.0299.04 ▼16.18
Media Library /wp-admin/upload.php3.25 ▲0.0244.57 ▲9.01

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

FoaF: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5614.57 ▲0.072.02 ▲0.0641.44 ▼1.24
Dashboard /wp-admin2,221 ▲145.84 ▼0.05102.62 ▼9.3338.78 ▼3.00
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0039.28 ▲1.4335.56 ▼2.19
Add New Post /wp-admin/post-new.php1,545 ▼023.11 ▲0.18603.79 ▼65.0357.36 ▲11.80
Media Library /wp-admin/upload.php1,400 ▲34.24 ▼0.03120.51 ▲0.5048.55 ▼1.87

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however 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
Please fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_query_var() in wp-content/plugins/simple-foaf/feed-foaf-author.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-foaf/simple-foaf.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/simple-foaf/feed-foaf.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: foaf, feed, xml

simple-foaf/simple-foaf.php Passed 13 tests

The principal PHP file in "FoaF" v. 1.0.1 is loaded by WordPress automatically on each request
21 characters long description:
FOAF RDF/XML profile.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected172 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP31531172

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods6100.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin