78% pressnative

Code Review | Pressnative

WordPress plugin Pressnative scored78%from 54 tests.

About plugin

  • Plugin page: pressnative
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.5.3
  • WordPress version: 6.3.1
  • First release: Sep 10, 2020
  • Latest release: Nov 26, 2020
  • Number of updates: 21
  • Update frequency: every 3.7 days
  • Top authors: abdullahdiaa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /677 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.64MB] [CPU: ▼15.09ms] Passed 4 tests

A check of server-side resources used by Pressnative
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.98 ▼2.40
Dashboard /wp-admin3.34 ▲0.0446.64 ▼4.56
Posts /wp-admin/edit.php3.39 ▲0.0446.88 ▲0.04
Add New Post /wp-admin/post-new.php3.22 ▼2.6636.20 ▼53.43
Media Library /wp-admin/upload.php3.27 ▲0.0433.93 ▲2.56

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pressnative
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,907 ▲15013.73 ▼0.654.83 ▲2.7739.10 ▼3.83
Dashboard /wp-admin2,229 ▲384.92 ▲0.02103.76 ▼16.5140.14 ▼5.35
Posts /wp-admin/edit.php2,109 ▲202.02 ▼0.0339.47 ▼1.3735.70 ▲1.55
Add New Post /wp-admin/post-new.php1,531 ▼217.65 ▼5.45676.11 ▲20.7650.44 ▼13.02
Media Library /wp-admin/upload.php1,405 ▲174.21 ▲0.0394.65 ▼5.4644.70 ▲1.90

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

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

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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/pressnative/public/partials/pressnative-public-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/pressnative/admin/partials/pressnative-admin-display.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
You can take inspiration from this readme.txt

pressnative/pressnative.php Passed 13 tests

"Pressnative" version 1.0.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
64 characters long description:
Launch a world class app from your WordPress website in minutes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin976 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12311683970
JavaScript24546
CSS2080

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity20.14
▷ Minimum class complexity1.00
▷ Maximum class complexity113.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods55
▷ Static methods35.45%
▷ Public methods4683.64%
▷ Protected methods00.00%
▷ Private methods916.36%
Functions8
▷ Named functions337.50%
▷ Anonymous functions562.50%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin