94% demomentsomtres-books

Code Review | DeMomentSomTres Books

WordPress plugin DeMomentSomTres Books scored 94% from 54 tests.

About plugin

  • Plugin page: demomentsomtres-b...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6.1
  • WordPress version: 5.8.1
  • First release: Mar 30, 2016
  • Latest release: Sep 29, 2016
  • Number of updates: 21
  • Update frequency: every 9.1 days
  • Top authors: marcqueralt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 568 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.47MB] [CPU: ▼141.36ms] Passed 4 tests

Analyzing server-side resources used by DeMomentSomTres Books
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.30 ▲0.5838.74 ▲16.55
Dashboard /wp-admin3.56 ▲0.5142.66 ▼2.13
Posts /wp-admin/edit.php3.61 ▲0.5045.84 ▲5.85
Add New Post /wp-admin/post-new.php5.86 ▲0.4287.86 ▼564.96
Media Library /wp-admin/upload.php3.44 ▲0.4431.86 ▼4.19
Book Categories /wp-admin/edit-tags.php?taxonomy=book-category&post_type=book3.4438.08
All Books /wp-admin/edit.php?post_type=book3.5536.98
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins3.5132.07
Add New /wp-admin/post-new.php?post_type=book3.6452.97

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for DeMomentSomTres Books
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,787 ▲19115.91 ▲0.398.88 ▼2.6150.58 ▲1.80
Dashboard /wp-admin3,053 ▲1195.93 ▼0.03136.06 ▼4.70120.67 ▲5.61
Posts /wp-admin/edit.php2,832 ▲932.86 ▲0.1368.26 ▲3.6291.73 ▼0.25
Add New Post /wp-admin/post-new.php1,728 ▲22818.78 ▼0.04364.42 ▼16.08106.62 ▼2.84
Media Library /wp-admin/upload.php1,901 ▲945.06 ▲0.02150.49 ▲7.85136.71 ▲17.80
Book Categories /wp-admin/edit-tags.php?taxonomy=book-category&post_type=book1,8292.5666.7790.08
All Books /wp-admin/edit.php?post_type=book1,5492.6663.3787.00
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins1,3172.1057.2782.03
Add New /wp-admin/post-new.php?post_type=book3,6289.15226.10167.06

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/demomentsomtres-books/lib/class-tgm-plugin-activation.php:1910
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/demomentsomtres-books/lib/class-tgm-plugin-activation.php:1910

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: books, schemaorg

demomentsomtres-books/demomentsomtres-books.php Passed 13 tests

The main PHP file in "DeMomentSomTres Books" ver. 1.1.1 adds more information about the plugin and also serves as the entry point for this plugin
58 characters long description:
Books management for authors, illustrators and publishers.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected2,504 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP24931,5022,006
PO File2157167448
Markdown121033
XML10017

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity39.88
▷ Minimum class complexity1.00
▷ Maximum class complexity178.00
Average method complexity3.78
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods112
▷ Static methods54.46%
▷ Public methods9282.14%
▷ Protected methods2017.86%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants00.00%
▷ Class constants14100.00%
▷ Public constants14100.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 were not PNG files found in your plugin