94% libwp

Code Review | LibWp

WordPress plugin LibWp scored 94% from 54 tests.

About plugin

  • Plugin page: libwp
  • Plugin version: 2.2
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.6.1
  • WordPress version: 5.8.1
  • First release: Jul 19, 2012
  • Latest release: Apr 4, 2021
  • Number of updates: 16
  • Update frequency: every 198.8 days
  • Top authors: mostafa.s1990 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active / 2,894 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼142.19ms] Passed 4 tests

A check of server-side resources used by LibWp
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.1837.89 ▲14.86
Dashboard /wp-admin3.12 ▲0.0746.04 ▼4.57
Posts /wp-admin/edit.php3.24 ▲0.1345.34 ▼2.65
Add New Post /wp-admin/post-new.php5.48 ▲0.0591.28 ▼560.75
Media Library /wp-admin/upload.php3.07 ▲0.0737.81 ▼0.79
Types /wp-admin/edit-tags.php?taxonomy=types&post_type=book3.0734.18
All Books /wp-admin/edit.php?post_type=book3.1139.52
Add New /wp-admin/post-new.php?post_type=book3.2557.43

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for LibWp
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,723 ▲11715.90 ▲0.4210.36 ▲1.9551.74 ▲0.53
Dashboard /wp-admin3,007 ▲705.92 ▼0.05150.35 ▼2.47118.50 ▼7.56
Posts /wp-admin/edit.php2,779 ▲402.70 ▲0.0170.82 ▼0.9494.59 ▲2.28
Add New Post /wp-admin/post-new.php1,696 ▲1319.23 ▲0.44383.45 ▼13.00119.20 ▲5.39
Media Library /wp-admin/upload.php1,847 ▲405.02 ▼0.05153.64 ▼11.20125.13 ▼2.29
Types /wp-admin/edit-tags.php?taxonomy=types&post_type=book1,7762.5068.5087.68
All Books /wp-admin/edit.php?post_type=book1,4962.6374.1479.26
Add New /wp-admin/post-new.php?post_type=book3,4568.99236.29141.85

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/libwp/index.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: post-type, functionality, library, taxonomy, theme

libwp/index.php 85% from 13 tests

The main PHP file in "LibWp" ver. 2.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Domain Path: The domain path folder was not found ("/resources/languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("libwp.php" instead of "index.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
There were no executable files found in this plugin323 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP457231207
Markdown1210116

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.04
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.05
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods2095.24%
▷ Protected methods00.00%
▷ Private methods14.76%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.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
No PNG files were detected