10% coastal-factoid

Code Review | Coastal Factoid

WordPress plugin Coastal Factoid scored10%from 54 tests.

About plugin

  • Plugin page: coastal-factoid
  • Plugin version: 0.95
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6.1
  • WordPress version: 6.3.1
  • First release: Sep 24, 2013
  • Latest release: Sep 25, 2013
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: gwsuperfan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /844 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/coastal-factoid/coastalfactoid.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; CFWidget has a deprecated constructor

Server metrics [RAM: ▼1.94MB] [CPU: ▼56.75ms] Passed 4 tests

Analyzing server-side resources used by Coastal Factoid
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.414.53 ▼37.14
Dashboard /wp-admin2.07 ▼1.275.89 ▼50.88
Posts /wp-admin/edit.php2.07 ▼1.286.09 ▼42.73
Add New Post /wp-admin/post-new.php2.07 ▼3.815.04 ▼96.26
Media Library /wp-admin/upload.php2.07 ▼1.166.87 ▼26.52

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_cfwidget
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Coastal Factoid
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.55 ▼0.731.63 ▼0.1743.99 ▲1.00
Dashboard /wp-admin2,206 ▲184.87 ▼0.04111.56 ▲4.8041.98 ▼1.37
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0036.27 ▼7.2636.07 ▼3.60
Add New Post /wp-admin/post-new.php1,533 ▲1923.44 ▲5.92711.48 ▲42.3260.20 ▼2.90
Media Library /wp-admin/upload.php1,388 ▼04.23 ▲0.0397.14 ▼0.8643.39 ▲0.55

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/coastal-factoid/coastalfactoid.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; CFWidget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_cfwidget
    • widget_recent-comments

Smoke tests 50% 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 0% 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/coastal-factoid/factoid.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/coastal-factoid/coastalfactoid.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% 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
2 plugin tags: widget, factoid

coastal-factoid/coastalfactoid.php 92% from 13 tests

The main file in "Coastal Factoid" v. 0.95 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("coastal-factoid.php" instead of "coastalfactoid.php")

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
Good job! No executable or dangerous file extensions detected31 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP26931

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
No PNG images were found in this plugin