88% larapress

Code Review | LaraPress

WordPress plugin LaraPress scored 88% from 54 tests.

About plugin

  • Plugin page: larapress
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.12-4.6
  • WordPress version: 5.8.1
  • First release: Jul 27, 2016
  • Latest release: Jul 30, 2016
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: graphems (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,171 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.33MB] [CPU: ▼134.20ms] Passed 4 tests

A check of server-side resources used by LaraPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.09 ▲0.3740.19 ▲16.82
Dashboard /wp-admin3.39 ▲0.3362.56 ▲13.54
Posts /wp-admin/edit.php3.44 ▲0.3347.99 ▲0.15
Add New Post /wp-admin/post-new.php5.75 ▲0.3196.70 ▼553.87
Media Library /wp-admin/upload.php3.34 ▲0.3337.49 ▲3.38
LaraPress /wp-admin/options-general.php?page=lara-press3.3333.80

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 120 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for LaraPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,775 ▲17916.16 ▲0.5610.50 ▲2.0751.63 ▼2.57
Dashboard /wp-admin3,064 ▲1346.34 ▲0.26155.13 ▼17.48121.52 ▲1.36
Posts /wp-admin/edit.php2,812 ▲733.12 ▲0.4378.33 ▲13.5991.09 ▼4.43
Add New Post /wp-admin/post-new.php1,709 ▲2618.57 ▲0.24385.73 ▼18.97109.34 ▼6.24
Media Library /wp-admin/upload.php1,880 ▲705.15 ▲0.13169.93 ▲11.28142.02 ▲6.40
LaraPress /wp-admin/options-general.php?page=lara-press1,1312.4166.5183.54

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=lara-press
    • > Notice in wp-content/plugins/larapress/views/admin/admin-settings.php+10
    Undefined index: _wpnonce

SRP 50% 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
Please fix the following
  • 63× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/larapress/vendor/loumray/wpcore/src/WPwidget.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WPLaravelBoostrap\\WPCore\\WPaction' not found in wp-content/plugins/larapress/vendor/loumray/wpcore/src/hooks/ThemeScript.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'WPLaravelBoostrap\\WPCore\\admin\\WPpostColumn' not found in wp-content/plugins/larapress/vendor/loumray/wpcore/src/admin/WPpageColumn.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WPLaravelBoostrap\\WPForms\\Text' not found in wp-content/plugins/larapress/vendor/loumray/wpforms/src/DatePicker.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WPLaravelBoostrap\\WPCore\\WPaction' not found in wp-content/plugins/larapress/vendor/loumray/wpcore/src/hooks/AdminScript.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'WPLaravelBoostrap\\WPCore\\WPaction' not found in wp-content/plugins/larapress/vendor/loumray/wpcore/src/admin/WPsubmenuPage.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPLaravelBoostrap\\load_plugin_textdomain() in wp-content/plugins/larapress/lara-press.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'WPLaravelBoostrap\\WPCore\\WPfeature' not found in wp-content/plugins/larapress/vendor/loumray/wpcore/src/WPplugin.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'WPLaravelBoostrap\\WPForms\\AbstractField' not found in wp-content/plugins/larapress/vendor/loumray/wpforms/src/Checkbox.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WPLaravelBoostrap\\WPForms\\AbstractField' not found in wp-content/plugins/larapress/vendor/loumray/wpforms/src/Wpeditor.php:13

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Donate link: Invalid url: ""
  • Plugin Name: You should set the name of your plugin on the first line ( === larapress === )
You can look at the official readme.txt

larapress/lara-press.php 92% from 13 tests

The principal PHP file in "LaraPress" v. 0.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("larapress.php" instead of "lara-press.php")

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 plugin5,528 lines of code in 115 files:
LanguageFilesBlank linesComment linesLines of code
PHP921,1051,7184,803
CSS53613367
JavaScript122210190
JSON400158
Markdown26010

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity6.52
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces10
Interfaces5
Traits1
Classes80
▷ Abstract classes911.25%
▷ Concrete classes7188.75%
▷ Final classes00.00%
Methods475
▷ Static methods173.58%
▷ Public methods46998.74%
▷ Protected methods51.05%
▷ Private methods10.21%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin