78% iati-project-data

Code Review | IATI Project Data

WordPress plugin IATI Project Data scored78%from 54 tests.

About plugin

  • Plugin page: iati-project-data
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.7
  • WordPress version: 6.3.1
  • First release: Aug 12, 2020
  • Latest release: Apr 7, 2021
  • Number of updates: 22
  • Update frequency: every 10.8 days
  • Top authors: willfonkam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /429 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
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼20.25ms] Passed 4 tests

Analyzing server-side resources used by IATI Project Data
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.96 ▼0.39
Dashboard /wp-admin3.32 ▼0.0350.12 ▼20.62
Posts /wp-admin/edit.php3.37 ▲0.0151.69 ▼10.54
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.94 ▼44.16
Media Library /wp-admin/upload.php3.24 ▲0.0138.03 ▼5.67

Server storage [IO: ▲0.09MB] [DB: ▲0.02MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: 2 new tables, 7 new options
New tables
wp_iati_codes
wp_iati_project_data
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
iati_project_opts

Browser metrics Passed 4 tests

This is an overview of browser requirements for IATI Project Data
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6114.28 ▲0.091.86 ▲0.2235.76 ▼8.51
Dashboard /wp-admin2,210 ▲305.61 ▼0.0790.18 ▲0.8739.12 ▼4.92
Posts /wp-admin/edit.php2,115 ▲152.03 ▼0.0039.74 ▼0.4634.73 ▼5.13
Add New Post /wp-admin/post-new.php1,538 ▲1223.06 ▲0.12682.21 ▼109.2556.25 ▲3.63
Media Library /wp-admin/upload.php1,412 ▲124.18 ▼0.07107.22 ▲10.1349.35 ▲2.34

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 were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/iati-project-data/iati-project-data.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function iati_get_data() in wp-content/plugins/iati-project-data/inc/admin/project-data.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/iati-project-data/inc/admin/no-data.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: data, open data, projects, d-portal, iati

iati-project-data/iati-project-data.php 85% from 13 tests

This is the main PHP file of "IATI Project Data" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: Please keep the plugin description shorter than 140 characters (currently 239 characters long)

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 plugin1,493 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP12119381,004
CSS27312386
PO File12930103

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin