84% lightpost

Code Review | Lightpost

WordPress plugin Lightpost scored84%from 54 tests.

About plugin

  • Plugin page: lightpost
  • Plugin version: 1.1.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 6.3.1
  • First release: Oct 29, 2019
  • Latest release: Nov 30, 2019
  • Number of updates: 10
  • Update frequency: every 3.3 days
  • Top authors: lightpost (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /571 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼7.09ms] Passed 4 tests

Server-side resources used by Lightpost
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.31 ▼3.50
Dashboard /wp-admin3.40 ▲0.1051.85 ▲0.48
Posts /wp-admin/edit.php3.51 ▲0.1647.36 ▼3.64
Add New Post /wp-admin/post-new.php5.98 ▲0.0987.00 ▼15.85
Media Library /wp-admin/upload.php3.32 ▲0.0934.04 ▼5.35
Lightpost /wp-admin/options-general.php?page=lightpost3.3239.22

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 12 new options
New WordPress options
lightpost_theme
can_compress_scripts
lightpost_sermon_archive_page_id
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
lightpost_bible_class_registration_page_id
lightpost_directory_disclaimer
lightpost_api_key
...

Browser metrics Passed 4 tests

A check of browser resources used by Lightpost
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.69 ▲0.341.66 ▼0.1440.52 ▼5.91
Dashboard /wp-admin2,199 ▲195.68 ▲0.0185.97 ▼0.5441.41 ▼2.37
Posts /wp-admin/edit.php2,104 ▲11.98 ▼0.0436.31 ▼4.8734.75 ▼3.44
Add New Post /wp-admin/post-new.php1,534 ▲623.15 ▲0.03657.06 ▼13.4760.79 ▲2.09
Media Library /wp-admin/upload.php1,407 ▲44.20 ▲0.0396.09 ▼5.4544.43 ▼3.64
Lightpost /wp-admin/options-general.php?page=lightpost9752.1624.9330.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/lightpost/views/directory.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/lightpost/views/family.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Lightpost\\is_admin() in wp-content/plugins/lightpost/includes/Settings.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/lightpost/views/admin.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/lightpost/views/bible_classes.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/lightpost/views/sermons.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: calendar, church, management, bible class, sermons...

lightpost/lightpost.php Passed 13 tests

Analyzing the main PHP file in "Lightpost" version 1.1.4
109 characters long description:
This plugin allows churches to display content from their Lightpost account on their Wordpress-based website.

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
Success! There were no dangerous files found in this plugin10,655 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
CSS51,234148,385
JSON2001,317
PHP1111512931
SVG60019
Sass1003

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity9.80
▷ Minimum class complexity2.00
▷ Maximum class complexity17.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods21
▷ Static methods29.52%
▷ Public methods1780.95%
▷ Protected methods314.29%
▷ Private methods14.76%
Functions6
▷ Named functions00.00%
▷ Anonymous functions6100.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected