83% narrafirma

Code Review | NarraFirma

WordPress plugin NarraFirma scored83%from 54 tests.

About plugin

  • Plugin page: narrafirma
  • Plugin version: 1.6.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-6.2
  • WordPress version: 6.3.1
  • First release: Oct 24, 2015
  • Latest release: Apr 26, 2023
  • Number of updates: 63
  • Update frequency: every 43.5 days
  • Top authors: cfkurtz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /3,787 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.76ms] Passed 4 tests

Analyzing server-side resources used by NarraFirma
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.72 ▼2.62
Dashboard /wp-admin3.32 ▲0.0243.10 ▼2.72
Posts /wp-admin/edit.php3.37 ▲0.0243.63 ▼0.97
Add New Post /wp-admin/post-new.php5.90 ▲0.0288.10 ▼14.20
Media Library /wp-admin/upload.php3.25 ▲0.0233.20 ▼7.50

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 384 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by NarraFirma
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.33 ▲0.121.79 ▲0.1343.36 ▼3.50
Dashboard /wp-admin2,211 ▲345.59 ▼0.0689.75 ▲2.1240.30 ▼1.58
Posts /wp-admin/edit.php2,119 ▲191.95 ▼0.0940.06 ▲2.8635.33 ▲3.58
Add New Post /wp-admin/post-new.php1,539 ▲2223.00 ▲4.29649.32 ▲103.5755.22 ▲2.40
Media Library /wp-admin/upload.php1,416 ▲164.17 ▼0.0595.18 ▼18.9642.51 ▼6.23

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/narrafirma/narrafirma.php

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 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Plugin Name: Please specify the plugin name on the first line ( === narrafirma === )
You can look at the official readme.txt

narrafirma/narrafirma.php Passed 13 tests

The main PHP file in "NarraFirma" ver. 1.6.5 adds more information about the plugin and also serves as the entry point for this plugin
138 characters long description:
Participatory Narrative Inquiry in a box. Gather stories and make sense of challenges and opportunities in your community or organization.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin156,040 lines of code in 328 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript207,97142,44396,588
TypeScript1956,4458,68845,563
HTML721,202410,308
CSS5669942,728
PHP1217175594
SVG3502259

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.42
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions2395.83%
▷ Anonymous functions14.17%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
46 PNG files occupy 2.65MB with 1.74MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
webapp/images/PNIPhasesDiagram.png40.83KB16.14KB▼ 60.47%
webapp/help/collection/help_importGuide_questionImportOptions.png208.96KB75.96KB▼ 63.65%
webapp/help/collection/help_startStoryCollection_rawData.png25.63KB7.15KB▼ 72.11%
webapp/help/collection/questionTypeThumbnail_checkbox.png9.02KB3.07KB▼ 66.00%
webapp/help/catalysis/graphThumbnail_multiHistograms.png6.82KB2.29KB▼ 66.48%