84% civil-footnotes

Code Review | Civil Footnotes

WordPress plugin Civil Footnotes scored 84% from 54 tests.

About plugin

  • Plugin page: civil-footnotes
  • Plugin version: 2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 6.3.1
  • First release: Apr 16, 2013
  • Latest release: Feb 3, 2020
  • Number of updates: 53
  • Update frequency: every 46.9 days
  • Top authors: defomicron (94.34%)kadamwhite (7.55%)

Code review

54 tests

User reviews

8 reviews

Install metrics

400+ active / 12,259 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.20ms] Passed 4 tests

An overview of server-side resources used by Civil Footnotes
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.47 ▼3.18
Dashboard /wp-admin3.36 ▲0.0546.36 ▲1.56
Posts /wp-admin/edit.php3.41 ▲0.0545.41 ▼1.41
Add New Post /wp-admin/post-new.php5.94 ▲0.0583.96 ▼19.53
Media Library /wp-admin/upload.php3.28 ▲0.0534.03 ▼0.66

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Civil Footnotes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4314.48 ▼0.131.75 ▼0.2243.37 ▼5.96
Dashboard /wp-admin2,206 ▲185.84 ▼0.0197.77 ▼4.1941.54 ▼0.51
Posts /wp-admin/edit.php2,086 ▼31.99 ▼0.0633.71 ▼5.7734.01 ▼0.02
Add New Post /wp-admin/post-new.php1,514 ▼2817.76 ▼0.76674.72 ▲56.9050.58 ▼2.40
Media Library /wp-admin/upload.php1,391 ▲64.28 ▲0.0494.90 ▼6.3541.97 ▼2.04

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
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 plugin_dir_path() in wp-content/plugins/civil-footnotes/civil-footnotes.php:48

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: footnotes, reference, posts, bibliography, formatting...

civil-footnotes/civil-footnotes.php 92% from 13 tests

The entry point to "Civil Footnotes" version 2.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Requires PHP: The required version number did not match the one declared in readme.txt ("7.0.0" instead of "7.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin339 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP341171286
JSON10035
CSS121518

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
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
Namespaces2
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%
Functions17
▷ Named functions1376.47%
▷ Anonymous functions423.53%
Constants1
▷ Global constants1100.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