62% team-factory

Code Review | Lanpa custom contents

WordPress plugin Lanpa custom contents scored 62% from 54 tests.

About plugin

  • Plugin page: team-factory
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.5.0
  • WordPress version: 6.3.1
  • First release: May 30, 2016
  • Latest release: May 30, 2016
  • Number of updates: 3
  • Update frequency: every 6.0 days
  • Top authors: TeamFactory (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 568 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.85MB] [CPU: ▼33.81ms] Passed 4 tests

Analyzing server-side resources used by Lanpa custom contents
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1145.66 ▲1.68
Dashboard /wp-admin3.10 ▼0.2125.55 ▼25.90
Posts /wp-admin/edit.php3.10 ▼0.2629.02 ▼22.34
Add New Post /wp-admin/post-new.php3.10 ▼2.7926.54 ▼68.96
Media Library /wp-admin/upload.php3.10 ▼0.1325.11 ▼18.04
Lanpa /wp-admin/themes.php?page=team-factory/lanpa-custom-contents.php3.1025.16

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

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

Browser metrics Passed 4 tests

Lanpa custom contents: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▼313.20 ▲0.025.91 ▲3.9843.30 ▼2.92
Dashboard /wp-admin2,211 ▲55.80 ▼0.06106.94 ▲0.8638.71 ▼1.18
Posts /wp-admin/edit.php2,097 ▲52.04 ▲0.0343.62 ▲4.1835.76 ▼1.97
Add New Post /wp-admin/post-new.php1,521 ▲717.57 ▲0.06736.96 ▼41.1751.42 ▼31.20
Media Library /wp-admin/upload.php1,390 ▲54.22 ▲0.0694.75 ▼8.3140.86 ▼5.55
Lanpa /wp-admin/themes.php?page=team-factory/lanpa-custom-contents.php1,4402.1924.4346.34

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 25% 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/themes.php?page=team-factory/lanpa-custom-contents.php
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

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× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/team-factory/lanpa-custom-contents.php:32

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/themes.php?page=team-factory/lanpa-custom-contents.php
    • > Network (severe)
    wp-content/plugins/team-factory/css/style.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/themes.php?page=team-factory/lanpa-custom-contents.php
    • > Network (severe)
    wp-content/plugins/lanpa-custom-contents/js/script.js?ver=1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/themes.php?page=team-factory/lanpa-custom-contents.php
    • > Network (severe)
    wp-content/plugins/lanpa-custom-contents/images/solution_mark.jpg - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/themes.php?page=team-factory/lanpa-custom-contents.php
    • > Network (severe)
    wp-content/plugins/lanpa-custom-contents/images/reason_mark.jpg - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/themes.php?page=team-factory/lanpa-custom-contents.php
    • > Network (severe)
    wp-content/plugins/lanpa-custom-contents/images/testimonials_mark.jpg - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: dashboard, plugin, theme, custom, text

team-factory/lanpa-custom-contents.php 85% from 13 tests

Analyzing the main PHP file in "Lanpa custom contents" version 1.0.0
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("team-factory.php" instead of "lanpa-custom-contents.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 394 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected430 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16934430

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity74.00
▷ Minimum class complexity74.00
▷ Maximum class complexity74.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods39
▷ Static methods00.00%
▷ Public methods39100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin